Posted By

sethetter on 04/10/11


Tagged

fix css clear utility


Versions (?)

CSS Clear Fix


 / Published in: CSS
 

  1. /* http://sonspring.com/journal/clearing-floats */
  2. html body * span.clear,
  3. html body * div.clear,
  4. html body * li.clear,
  5. html body * dd.clear
  6. {background: none; border: 0; clear: both; display: block; float: none; font-size: 0; list-style: none; margin: 0; padding: 0; overflow: hidden; visibility: hidden; width: 0; height: 0;}
  7.  
  8. /* http://www.positioniseverything.net/easyclearing.html */
  9. .clearfix:after{clear: both; content: '.'; display: block; visibility: hidden; height: 0;}
  10. .clearfix{display: inline-block;}
  11. * html .clearfix{height: 1%;}
  12. .clearfix{display: block;}

Report this snippet  

You need to login to post a comment.