Posted By

lamebollock on 07/11/11


Tagged

css clearfix floats


Versions (?)

A new micro clearfix hack – Nicolas Gallagher


 / Published in: CSS
 

URL: http://nicolasgallagher.com/micro-clearfix-hack/

  1. /* For modern browsers */
  2. .cf:before, .cf:after {
  3. content:"";
  4. display:table;
  5. }
  6. .cf:after {
  7. clear:both;
  8. }
  9. /* For IE 6/7 (trigger hasLayout) */
  10. .cf {
  11. zoom:1;
  12. }

Report this snippet  

You need to login to post a comment.