Menu
The float
property sets an element to float to the left, right, or not at all.
Use the clear
property to keep elements next to a floating element from flowing around it. Absolutely positioned elements ignore the float
property.
div.ex {
float: left;
}
none
Default value. No float is applied.
left
The element floats to the left edge of its container.
right
The element floats to the right edge of its container.
initial
Sets the property to its default value.
inherit
Inherits this property’s value from its parent item.
Have a code example of float
? Submit a codepen.io demo and we'll showcase it here ↴