XML technologies / CSS / Advanced websites with CSS / CSS property reference / float
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property float allows a neighbouring element to flow around an element at the right or left edge of its parent. If a block element follows a floating element, the float does not affect the block’s position on the page; only its content flows around the float. Elements assigned the CSS property clear cannot flow around floating elements.
Inherited: no
See also: clear
Values
left, right or none.
Default value: none
Compatibility
CSS version: 1
Works in all CSS-capable browsers, including Netscape 4, Internet Explorer 4 and Mozilla.
Example
The following rule makes images of the class textbild float at the left side of their parent element, with subsequent elements flowing around them:
img.textbild {
float: left;
}
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