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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access