CSS · Layout

align-items

Aligns items on the cross axis of a flex container.

Syntax
align-items: center

Example

Try it

More in this group

align-content align-self clear display flex 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