float

The float CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning).

Initial value none
Applies to all elements, but has no effect if the value of display is none.

Syntax

  
float: left;
  

Values

The element must float on the left side of its containing block.
The element must float on the right side of its containing block.
The element must not float.
The element must float on the start side of its containing block. That is the left side with ltr scripts, and the right side with rtl scripts.
The element must float on the end side of its containing block. That is the right side with ltr scripts, and the left side with rtl scripts.

Browser support

float1121471
flow_relative_values55

We use cookies to improve your experience. Learn more in our Privacy policy.

×