.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } /* IE6 */ * html .clearfix { height: 1%; } /* IE7 */ *:first-child + html .clearfix { min-height: 1%; }
.clearfix:before, .clearfix:after { content: " "; display: table; } .clearfix:after { clear: both; } /** * For IE 6/7 only * Include this rule to trigger hasLayout and contain floats. */ .clearfix { *zoom: 1; }