CSS clearProperty


Example

Specifies that no floating elements are allowed on the left or right side of the specified paragraph:

img { float:left; } p.clear { clear:both; }

Try it Yourself »
See more examples at the bottom of this page.

Property definition and usage instructions

The clear property specifies that no floating elements are allowed on the left or right side of a paragraph.

Default value: none
Inheritance: no
version: CSS1
JavaScript Syntax: object.style.clear="left"


Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
clear 1.0 5.0 1.0 1.0 6.0

Property value

Value Description
left Floating elements are not allowed on the left side.
right Floating elements are not allowed on the right side.
both Floating elements are not allowed on either the left or right side.
none Default. Allows floating elements on both sides.
inherit Specifies that the value of the clear property should be inherited from the parent element.


Related Articles

CSS Tutorial:CSS Float

other extensions