CSS
CSS FloatCSS Float
CSS float wraps text around images and block elements.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
CSS originally used float to push images to the side and let text flow around them. While flexbox replaced it for main page layouts, developers still use float for its original purpose. Floating elements removes them from the normal document flow.
Syntax
Syntax
Example
Example
Key Points
- Float pushes elements to the left or right.
- Text wraps around floated elements automatically.
- The `clear` property stops the floating behavior below.
- Flexbox and Grid offer better modern layout controls.