Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)
The CSS 'align-items' property is a key player in Flexbox and Grid layouts, providing a way to align child elements (items) within their container vertically. Think of it as the tool that determines how items line up along the cross-axis (typically up and down if your flex-direction is row-wise), especially when the items do not all have the same height.
See the Pen
CSS 'align-items' Property by Webzstore (@webzstore)
on CodePen. Items are aligned based on the baseline of their content, which is particularly noticeable when text sizes differ. You'd use 'align-items' to control the vertical alignment of items within a flex container (or grid items within a grid container along the block axis). This property is incredibly useful for ensuring consistent vertical spacing, alignment, and space distribution among items that may vary in size or to match a specific design requirement.CSS 'align-items' Property Examples
Browser Support For 'align-items' Property
52.0 10.1 57.0 16.0 44.0 CSS Syntax of the 'align-items' Property
align-items: stretch|flex-start|flex-end|center|baseline|initial|inherit;
Usage of the 'align-items' Property
Property Values of the 'align-items' Property
"*" indicates required fields