Posted By

marcio on 01/25/10


Tagged

css clear clearing


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

troynt
naikon


The New Clearfix Method


 / Published in: CSS
 

URL: http://perishablepress.com/press/2009/12/06/new-clearfix-hack/

  1. .clearfix:after {
  2. visibility: hidden;
  3. display: block;
  4. font-size: 0;
  5. content: " ";
  6. clear: both;
  7. height: 0;
  8. }
  9. * html .clearfix { zoom: 1; } /* IE6 */
  10. *:first-child+html .clearfix { zoom: 1; } /* IE7 */

Report this snippet  

You need to login to post a comment.