Name

clear — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

Defines whether the element allows itself to be displayed in the same horizontal band as a floating element. 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 property to the same side (left or right). If you aren’t sure where the potential overlap might occur, set the clear property to both. An element whose clear property is set to a value other than none is rendered at the beginning of the next available line below the floating element.

Example

document.all.myDiv.style.clear = "both"

Value

Case-insensitive string of any of the following constants: both | left | none | right.

Default

none

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.