align-items
Defines the default behavior for how items are aligned along the cross axis (perpendicular to the main axis) in a flex or grid container.
It is documented as part of the CSS Box Alignment, CSS Flexible Box Layout specification.
Syntax
/* Usage Example */
.container {
display: flex;
align-items: center;
/* centers items vertically in a row container */
}
/* Syntax */
align-items: normal;
align-items: stretch;
align-items: anchor-center;
/* Global values */
align-items: inherit;
align-items: initial;
align-items: revert;
align-items: revert-layer;
align-items: unset;
align-items Browser support
Widely available
Since
2015 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.
29+
20+
9+
12+