Difference between revisions of "CSS GUIDE CLEAR"
(No difference)
|
Revision as of 23:13, 11 December 2006
This document is a work in progress and is subject to change.
Contents
Summary
Image and text elements that appear in another element are called floating elements. The clear property sets the sides of an element where other floating elements are not allowed.
Applicability: | The clear property can be used for block-level elements. | |
Media Group: | Visual | |
Inherited: | No | |
Default Value: | none |
Syntax
TARGET_ELEMENT{clear: inhert !important} TARGET_ELEMENT{clear: none} TARGET_ELEMENT{clear: left} TARGET_ELEMENT{clear: right} TARGET_ELEMENT{clear: both}
Legal Values
Value | Description |
---|---|
inherit | Explicitly sets the value to that of the parent |
none | Allows floating elements on both sides. |
left | No floating elements allowed on the left side. |
right | No floating elements allowed on the right side. |
both | No floating elements allowed on the left side or the right side. |
Mozilla Recommended Values
Usage Examples
h1{ clear: none } h2{ clear: right }
Notes
The clear property does not always work as expected if it is used along with the "float" property.
Specification Conformance
- CSS 1
- CSS 2.1
- CSS 3