.clearfix 2012 and Beyond Tutorial
12/07/2012Now that IE6/7 are dead here is all the clearfix code that is needed for modern browsers and IE8+. I'm also renaming it to .contain. If by chance you still wish to support IE6/7 then just add either zoom:1; or a width to the containing box thereby creating haslayout.
.contain:after { content:''; display:table; clear:both; }
OR...
.contain:after { content:''; display:block; clear:both; }