The CSS property clear

Clear works in conjunction with float and prevents an element of being adjacent to another: it is moved to a new line.
Clear depends on the previous item, in the same container, it does not take into account the clear property in the style of the same element.

left

The element is located beneath all the elements whose float property is left.

right

Similarly for elements with float right.

both

The element is placed below all the elments in the same container with float left or right.

none

The property is set aside.

Examples

<p style="float: left; "> 
<p style="clear: left;">  

Clear applies to the second paragraph, and it is positioned on the left.

Contradictory

<p style="float: right; "> 
<p style="clear: left;">  

Clear has no effect because the previous paragraph is to float right while it refers to the attribute float left.

<p style="float: left;clear: left;">  

Clear has no effect because the float and clear properties are part of the style of the same paragraph.

References

© 2010-2012 Xul.fr