CSS · Layout

flex

Lays children out in one dimension and distributes free space along the main axis.

Syntax
display: flex

Example

Try it

More in this group

align-content align-items align-self clear display flex-basis flex-direction flex-grow

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course