- Home
- /
- Tutorials
- /
- CSS Tutorial
- /
- Align Items
CSS Flexbox
Align Items
The
align-itemsproperty is used to control the alignment of flex items along the cross axis of a flex container.
While justify-content controls alignment on the main axis, align-items controls alignment on the cross axis. The supporting concepts are explained in Justify Content and Flex Item Sizing.
For a flex container with:
css
flex-direction: row;Main Axis -> Horizontal
Cross Axis -> Vertical
The align-items property is commonly used to center items vertically, align them at the top or bottom, or stretch them to fill available space.
Syntax
Align Items Syntax
css
