I can never clear a element for some reason, its just to confusing!. I try this:
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html .clearfix { zoom: 1; } /*IE6*/
*:first-child+html .clearfix { zoom: 1; } /*IE7 */
to the parent element, and nothing works! Really confusing :/
Try this from html5boilerplate.com: