Clearing the clearfix

.Clearfix is a classname which is used often on websites to make sure that a wrapping box gets the height of all it’s (floating) children. This means that child elements will not stick out of the box if they are floated (float: left/right)

A lot of people love the .clearfix, it has been introduced somewhere in 2004, which is a while ago. I was using the .clearfix a lot, and I loved it! Until… Someone @fronteers (http://fronteers.nl) told me what I am about to tell you now..

Do not use .clearfix! In 2004 it was a nice way to go, but that is a while ago…
[Read more…]