submitted by: Snippissimo

CSS: clear float

When using float:left or float:right to format an element, you will need a way to reset this behavior for the rest of the css layout. The clearfloat class is a common solution, apply it to a <br /> or <div> tag.


code snippet:
.clearfloat {
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}

notes:
Often used by assigning the class to an element such as: <br class = "clearfloat" />