AI Workshop: learn to build apps with AI →
Flexbox: Vertical alignment using align-self

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


An item can choose to override the container align-items setting, using align-self, which has the same 5 possible values as align-items:

  • flex-start: align to the top of the container.
  • flex-end: align to the bottom of the container.
  • center: align at the vertical center of the container.
  • baseline: display at the baseline of the container.
  • stretch: items are stretched to fit the container.

Vertical alignment

Lessons in this unit:

0: Introduction
1: Align rows or columns
2: Vertical and horizontal alignment
3: Wrap
4: Moving items before / after another one using order
5: ▶︎ Vertical alignment using align-self
6: Grow or shrink an item if necessary
7: Create a layout using Flexbox
8: How to have a flex child not fill entire height