Flexbox playground

Knowledge Videos

Short animated explainers, organised by subject.

Flexbox playground

Change flex-direction, justify-content, align-items, wrap and gap on a real flex container.

Flexbox lines up the children of a container. The container has display: flex, and its children are the flex items.

justify-content places the items along the main direction, align-items places them across it, gap adds space between them, and flex-wrap lets them move to the next line when the row is full.

Things to try

From the videos