Posted By

michaelx on 10/05/11


Tagged


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

spee66
willyleeks
jcroft
pshahrouz


A new micro clearfix hack


 / Published in: CSS
 

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

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

Report this snippet  

You need to login to post a comment.