Posted By

Nettuts on 06/29/10


Tagged

css clear clearfix floats


Versions (?)

Who likes this?

25 people have marked this snippet as a favorite

Snaver
sandrews_06
ichnoweb
gdespeaux
laurentzziu
aelien
seanpowell
chendrix
romainsauger
kwameboame
visudex
charlesp1138
baczoni
samkamerer
moopee1176
altrix5
petemcbride
rozky
qubestream
SevenLayersDesign
leobetosouza
5392mf02
yoitsben
ringo380
buda9


CSS Clearfix


 / Published in: CSS
 

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

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Nettuts on June 29, 2010

Simply apply a class of "clearfix" to any parent element that will need clearing.

You need to login to post a comment.