Tree of DesignAll terms A–Z

Flexbox

CSS layout for distributing items along one axis.

See it on the 3D tree

Going deeper

A container sets a main axis, either row or column, and its children share the space along it, growing, shrinking or wrapping as allowed. Separate properties align items along the main and cross axes. When lines wrap, each is laid out independently, so columns need not line up.

Why it matters

It handles toolbars, button groups and centring cleanly, and thinking in its terms makes resizing behaviour easier to specify.

In practice

A header keeps the logo at one end and account controls at the other, with the gap absorbing changes in width.

Common mistake

Using wrapped Flexbox rows for a strict grid and then wondering why items in the last row do not line up.

Connected terms