Clear that really works


/ Published in: CSS

Thanks Thierry!


Copy this code and paste it in your HTML
  1. .clearfix:before,
  2. .clearfix:after {
  3. content: ".";
  4. display: block;
  5. height: 0;
  6. overflow: hidden;
  7. }
  8. .clearfix:after {clear: both;}
  9. .clearfix {zoom: 1;} /* IE < 8 */

URL: http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.