Chapter 15: Floating and Positioning


TOP

float

The float property moves an element as far as possible to the left or right and allows content to wrap around it. Think of it like the 'floated' items are popped out of the stream, sticking out and letting everything else continue around it as normal.

Note that the floated element is placed within the content area (inner edges) of the paragraph or element that contains it. It does not extend into the padding area. Margins are also fully maintained for a floated element.