Clearfix Revisited

The new style rules I’m using:

.clear:after {
    content:" ";
    display:block;
    height:0;
    clear:both;
    visibility:hidden;
    font-size:0;
}
.clear { display: inline-block; }
/* Hides from IE-mac \*/
* html .clear { height:1%; }
.clear { display:block; }
/* End hide from IE-mac */

For more infor­ma­tion on the update, have a read over at Jeff Starr’s Per­ish­able Press arti­cle. If you are com­pletely new to this tech­nique, it orig­i­nated from this arti­cle.

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>