CSS clear property
Specifies elements that are not allowed to float on the left or right side of a paragraph:
{
float:left;
}
p.clear
{
clear:both;
}
Try it out . . .
See more instances at the bottom of this page.
Description of property definition and use
The clear property specifies elements that are not allowed to float on the left or right side of a paragraph.
Default: | none |
---|---|
Inheritance: | no |
Version: | CSS1 |
JavaScript syntax: | object .style.clear="left" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
clear | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
The property value
Value | Describe |
---|---|
left | Floating elements are not allowed on the left. |
right | Floating elements are not allowed on the right. |
both | Floating elements are not allowed on either side. |
none | The default. Allow floating elements to appear 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