Posted By

annalog on 10/16/09


Tagged

css clearfix


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

morvan


Slightly enhanced universal 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.