January 17, 2021
Intro to CSS Flexbox - Align Items
CSS align-items sets the default behavior for how flex items are positioned along the cross axis on the current line. Think of this as the justify-content equivalent of the cross-axis relative to flex items within a flex container.
You'll often reach for this property to make the flex items within a parent container all consistently aligned on a baseline or align to top/bottom.
stretch(default): flex items stretch to fill the container (still respect min-width/max-width)
flex-start / start / self-start: flex items are placed at the start of the cross axis.
flex-end / end / self-end: flex items are placed at the end of the cross axis.
center: flex items are centered in the cross-axis
baseline: flex items are aligned so their baselines align
Tags: flexbox align-items
Previous Intro to CSS Flexbox - Flex Wrap
Leave a reply
Est. reading time: 42 seconds
Stats: 569 views
Source code: Download the source code
Part of the CSS Flexbox collection
Sign in or Sign up to leave a response.