Posted By

mattlowden on 08/28/12


Tagged

css clear float


Versions (?)

clear-fix


 / Published in: Bash
 

Makes the element with the class "clear-fix" extend to the height of the inner floated elements.

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

Report this snippet  

You need to login to post a comment.