align-content

Distributes the space between the lines of a flex container on the cross axis. It only has an effect when there are multiple lines, that is, with flex-wrap: wrap.
  • stretch (default): lines stretch to take up the available space.
  • flex-start: packs the lines at the start.
  • center: packs the lines in the center.
  • flex-end: packs the lines at the end.
  • space-between: the first and last lines touch the edges and the rest are spread between them.
  • space-around: leaves the same space around each line.
  • space-evenly: leaves identical spaces between lines and at the edges.

Example

This container has a fixed height and several lines. Change align-content to distribute the rows. If you remove flex-wrap in the editor, you will see it no longer has any effect.

Select align-content:
ResultLive
html
css