Name

float

Values:

left|right|none

Example:

P.sidebar { float: right }

Applies to:

All elements

Inherited:

No

The float property works much like the align attribute for images—it positions an element against the left or right border and allows text to flow around it. Support for the float property is sketchy as of this writing, but it could prove to be useful in the future for creating drop caps and similar effects.

Get Web Design in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.