Posted By

fabienthomas on 08/25/10


Tagged

css clear


Versions (?)

Clear CSS


 / Published in: XHTML
 

  1. <!-- CSS -->
  2.  
  3. .container{width: 900px; margin: 0 auto;}
  4. .right{float: right; width: 580px;}
  5. .left{float: left; width: 300px;}
  6. .clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;}
  7.  
  8. <!-- end CSS -->
  9.  
  10. <!-- HTML -->
  11.  
  12. <div class="container">
  13. <div class="right">content</div>
  14. <div class="left">aside</div>
  15. <span class="clear">&nbsp;</span>
  16. </div>
  17.  
  18. <!-- ! HTML -->

Report this snippet  

You need to login to post a comment.