Michael Weber: Random Bits and Pieces

Tony Aslett developed a way to clear float without structural markup. The technique is used on this site.

.clearfloat:after {
    content: ""; 
    display: block; 
    height: 0; 
    clear: both; 
    visibility: hidden;
}
Floating content here
Normal content here.

Observe how the floating box overlaps the bottom border of its container.

Floating content here
Normal content here. The floating box is fully enclosed in the container.