display: flow-root

A display value that makes an element a normal block which also starts a new block formatting context.

In more detail

The element behaves like a normal block from the outside. It is the modern, side-effect-free way to stop child margins collapsing through the parent and to contain floats.

Related terms

Taught in

References