Posted By

kcmr on 11/19/08


Tagged

css clearfix


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

CommissarXiii
shilguhn


Painless and super simple clearfix without any hack or browser specific selector


 / Published in: CSS
 

URL: http://uninstallme.com/ejemplos/simple-clearfix/

  1. Based in my previous snippet: http://snipplr.com/view/8373/another-way-to-clear-floating-elements-ff-ie-6-ie-7-ie-8-beta/ but removing the unnecessary
  2.  
  3. /**
  4.  * :after for Firefox, Webkit, Presto, IE 8
  5.  * min-height: 0 for IE 7
  6.  * height: 1% for IE 6
  7.  */
  8. .clearfix:after{content: ""; display: block; clear: both; height: 0; visibility: hidden;}
  9. .clearfix{min-height: 0; height: 1%;}

Report this snippet  

You need to login to post a comment.