NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties

float


This property influences the horizontal alignment of an element, making it "float" toward the left or right margin of its containing element. Possible values are left, right, and none. Floated regions act much like <img> tags that have been aligned left or right with respect to text.

Examples


#myimage {float: left;}
#pullquote {border-style: double; border-width: 5px;
background-color: yellow; float: right;}

Browser and CSS Support Notes


CSS1
IE 4, 5 (buggy), 5.5, 6
Nav 4, 4.5-4.8 (buggy), 6, 7
Opera 6, 7

(X)HTML Elements
CSS Properties
Back: empty-cells Next: font properties
< Home | About | Chapters | Examples | Errata | Reference | Site Map >