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.