XML technologies / CSS / Advanced websites with CSS / CSS property reference / clear
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property clear prevents text from flowing around an element, forcing it to appear only below the relevant element. clear can also be defined specifically for text flow on the right or left only.
Inherited: no
See also: float
Values
left, right, none or both.
Default value: none
Compatibility
CSS version: 1
Works in all CSS-capable browsers, including Internet Explorer 4 and later, Netscape 4 and later, and Mozilla.
Example
The following style rule ensures that the HTML element with the ID fusszeile has no other elements flowing around it:
#fusszeile {
clear: both;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg