Floats
A float is a box that is shifted to the left or right to the outer edge of the containing block. Other boxes flow by along the side of the floated box.
- Floats need to have a width.
- Other boxes flow by as if the float were not there, but the line boxes within the boxes are shortened to make room for the float, resulting in text flowing around the float.
- Other boxes can prohibit the float from floating next to them by using the clear property.
Float example
In the float example, the nav and sidebar divisions have been floated left and right, respectively. The content division, in the normal flow, flows between them.
More information
- Floats — W3C