Posted By

MoFu on 04/02/08


Tagged

fix hack clear float clearfix


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

paullorentzen
Akiva
visuallyspun
wiired


clearfix


 / Published in: CSS
 

This Hack works in any browser!

  1. .clearfix:after{
  2. content: "."; display: block;
  3. clear: both;
  4. visibility: hidden;
  5. line-height: 0;
  6. height: 0;
  7. }
  8. .clearfix{
  9. display: inline-block;
  10. }
  11. html[xmlns] .clearfix{
  12. display: block;
  13. }
  14.  
  15. * html .clearfix{
  16. height: 1%;
  17. }

Report this snippet  

You need to login to post a comment.