CSS property: float

Description

This property specifies whether a box should float to the left, right, or not at all.

It may be set for any element, but only applies to elements that generate boxes that are not absolutely positioned.

Syntax

float: left | right | none | <page-floats>;

Values

none (by default)

The box is not floated.

left

The element generates a block box that is floated to the left. Content flows on the right side of the box, starting at the top (subject to the clear property).

right

Similar to left, except the box is floated to the right, and content flows on the left side of the box, starting at the top.

<page-floats>

See Generated Content for Paged Media [CSS3GCPM].

Versions

Examples

aside {
    float: right;
}