Posted By

AzizLight on 10/19/09


Tagged

css clearfix


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

luman
StrawMan


Clearfix Improved


 / Published in: CSS
 

URL: http://css-tricks.com/snippets/css/clear-fix/

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

Report this snippet  

You need to login to post a comment.