Created 2011 February 25. Modified 2011 April 20.
Standards and new stuff hand-in-hand, brilliant!
.contain {display:inline-block;}
.contain {display:block;} The first line makes the element hasLayout true and therefore contain floats. The second line makes the element display as a block again..clearfix:after {
content:" ";
display:block;
height:0;
font-size:0;
clear:both;
visibility:hidden;
}
.clearfix {display:inline-block;}
/* mac hide \*/
* html .clearfix {height:1%;}
.clearfix {display:block;}
/* End hide */
.floatcontainer:after{
content: ".";
display: block;
height: 0;
font-size:0;
clear: both;
visibility:hidden;
}
.floatcontainer{
display: inline-block;
}
/* Hides from IE Mac \*/
* html .floatcontainer {height: 1%;}
.floatcontainer{display:block;}
/* End Hack */
/* new clearfix */
.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 */
.clear {
display:inline-block;
}
.clear:after {
display:block;
visibility:hidden;
clear:both;
height:0;
content: ".";
}