Posted By

hamsterbacke82 on 10/21/10


Tagged

css clear floats


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vaskointeractive


css clearfix


 / Published in: CSS
 

  1. /**** clearfix ***/
  2. .views-field-field-carpark-number-value:after,
  3. .ClearFix:after{
  4.  
  5. content:".";
  6. display:block;
  7. height:0;
  8. clear:both;
  9. visibility:hidden;
  10. height:1%;
  11. }
  12.  
  13. /* WinIE7 only */
  14. *:first-child+html .ClearFix{
  15. height:1%;
  16. }
  17.  
  18. /* WinIE6 and below */
  19. /*\*/
  20. * html .ClearFix{
  21. height:1%;
  22. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: adamcoulombe on October 22, 2010

its way easier to just put overflow:auto on the parent element (container) of the floated elements

Posted By: vaskointeractive on October 27, 2010

@adamcoulombe : overflow is not always appropriate, some layouts will trigger scrollbars with overflow:auto

You need to login to post a comment.