clear

The clear property specifies which sides of an element's box(es) may not be adjacent to an earlier floating box.

Syntax

clear: none | left | right | both | inherit
Initial: none
Applies To: block-level elements
Inherited: no
Percentages: NA
Media: visual

Values

clear: value
Value Description
both Clears earlier left-floating and right-floating boxes
left Clears earlier left-floating boxes
none No constraint with respect to float
right Clears earlier right-floating boxes

DOM

[window.]document.getElementById("element-id").style.clear = "clear";

Example | both

Example | left

Example | none

Example | right

Example | DOM

External

W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification