HTML and CSS Reference
In-Depth Information
Name
clear
Values:
left | right | both | none
Initial value:
none
Applies to:
Block-level elements
Inherited:
No
Computed value:
Same as declared value
Description:
Defines to which side (or sides) of an element no floating element may be placed. If normal
layout of a cleared element would result in a floated element appearing on the cleared side, the
cleared element is pushed down until it sits below (clears) the floated element. In CSS1 and
CSS2, this is accomplished by automatically increasing the top margin of the cleared element.
In CSS2.1, clearance space is added above the element's top margin, but the margin itself is
not altered. In either case, the end result is that the element's top outer border edge is just be-
low the bottom outer margin edge of a floated element on the declared side.
Examples:
h1 {clear: both;}
p + h3 {clear: right;}
Search WWH ::




Custom Search