Difference between revisions of "CSS GUIDE CLEAR"

From CDOT Wiki
Jump to: navigation, search
 
(Specification Conformance)
Line 67: Line 67:
 
== Specification Conformance  ==
 
== Specification Conformance  ==
 
*CSS 1
 
*CSS 1
*[http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-right CSS 2.1]
+
*[http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-clear CSS 2.1]
 
*CSS 3
 
*CSS 3
  

Revision as of 23:14, 11 December 2006

This document is a work in progress and is subject to change.

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

ValueDescription
inheritExplicitly sets the value to that of the parent
noneAllows floating elements on both sides.
leftNo floating elements allowed on the left side.
rightNo floating elements allowed on the right side.
bothNo 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

Browser Compatibility

See Also