← Back to properties

CSS Property

align-items

Flexbox

Aligns flex items along the cross axis.

Syntax

align-items: value;

Example

align-items: center;

Common use cases

  • Vertically centering items in a flex row
  • Stretching items to fill container height
  • Aligning icons with text

Practical developer insight

align-items: stretch is the default — items will fill the container height unless you override it. If centering seems broken, check that the container has an explicit height.

Related properties