Proper float clearing

I was browsing through Forrst recently and happened across the following advice on float clearing.

An easy way to properly clear floats without extra markup. If you’re not using some sort of clearfix you probably should be.

.clearself:before,
.clearself:after {
content: " ";
display: block;
height: 0;
overflow: hidden;
}
.clearself:after {clear: both;}
.clearself {zoom: 1;} /* IE < 8 */

This looks like a great way of reducing design related markup in your HTML. What do you think? Have you tried this technique before?

The original post is here.

Tags:

WordPress SEO: 10 tips for better search rankings

FREE E-book. Learn the basics of WordPress SEO and how to improve the key metrics
  • We won't sell your address to anyone. We hate spam too.
View my portfolio Get in touch

Leave a Reply