Align items
noun
say it: “uh-LYN EYE-tumz” /əˈlaɪn ˈaɪtəmz/
The CSS property that lines up all the items in a flex or grid container across the main direction: at the start, the center, the end, or stretched to fill.
What does align-items do?
align-items lines items up along the cross axis: top, center, bottom, or stretched to fill.
.user-row { display: flex; align-items: center; } /* avatar and name centered vertically */
In a sentence
- “With align-items: center, the coffee cup icon and the price sit on the same middle line.”
Level: Journeyman · More CSS terms at this level
Updated