clearNN 4 IE 4 CSS 1

Inherited: No

Defines whether a block-level element allows itself to be displayed in the same horizontal band as a nearby floating element, such as an image. Typically, another element in the vicinity has its float style attribute set to left or right. To prevent the current element from being in the same band as the floating block, set the clear attribute to the same side (left or right). If you aren't sure where the potential overlap might occur, set the clear attribute to both. An element with a clear attribute that is set to a value other than none is rendered at the beginning of the next available line below the floating element.

 
CSS Syntax
 
clear: both | left | none | right
 
Value

Any of the following constants: both | left | none | right.

 
Initial Value

none

 
Example
 
<img src="logo.gif" height="40" width="60" style="float: right">
<h1 style="clear: right">Giantco Corporation</h1>
 
Applies To

Block-level elements.

 
Object Model Reference
 
[window.]document.getElementById("elementID").style.clear