Posted By

shodan_uk on 01/10/11


Tagged

css float clearfix utility


Versions (?)

Clearfix


 / Published in: CSS
 

URL: http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack/

  1. /* slightly enhanced, universal clearfix hack */
  2. .clearfix:after {
  3. visibility: hidden;
  4. display: block;
  5. font-size: 0;
  6. content: " ";
  7. clear: both;
  8. height: 0;
  9. }
  10. .clearfix { display: inline-block; }
  11. /* start commented backslash hack \*/
  12. * html .clearfix { height: 1%; }
  13. .clearfix { display: block; }
  14. /* close commented backslash hack */

Report this snippet  

You need to login to post a comment.