document.ids.clear

JavaScript 1.2+ Nav4+ Syntax

document.ids.idName.clear

Description

The clear property specifies the sides of an element where floating elements (elements that define the align property) are not allowed. Using dot notation, this property is associated with the ID called idName.

The clear property can be assigned one of the following values: left, right, both, and none.

Example

Listing 7.114 uses the clear property to prevent floating elements from being on either side.

Listing 7.114 Using the clear Property
 <html> <script> <!-- Hide //Create a style sheet classes and id that set alignments document.classes.LEFT.all.align = "left"; document.classes.LEFT.all.backgroundColor = "yellow"; document.classes.RIGHT.all.align ...

Get Pure JavaScript 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.