Posted By

lucian on 10/04/10


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

bobbym245
jplr


Clear floats


 / Published in: CSS
 

Use group class as the container for floating blocks. Works in IE6/7/8 too.

  1. .group:after {
  2. content: ".";
  3. display: block;
  4. height: 0;
  5. clear: both;
  6. visibility: hidden;
  7. }
  8.  
  9. * html .group {
  10. height: 1%;
  11. }
  12.  
  13. *:first-child+html .group {
  14. min-height: 1px;
  15. }

Report this snippet  

You need to login to post a comment.