![]() |
VOOZH | about |
The CSS float property is used to position an element to the left or right of its container. It allows surrounding content to wrap around the floated element.
Syntax:
float: none | left | right | initial | inherit;Some examples of CSS Float are discussed below:
The float: left; CSS property positions an element on the left side of its container, allowing content to flow around its right side.
The float: right; CSS property positions an element on the right side of its container, allowing content to flow around its left side.
The float: none; CSS property resets the floating behavior of an element, causing it to not float and remain in the normal document flow.
The float: inherit; CSS property makes an element inherit the float value from its parent element, ensuring consistency with the parent's floating behavior.