justify-items
Defines the default alignment for all items inside a grid container along the inline (horizontal) axis.
Quick example
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr;
/* Centers all children horizontally within their grid cells */
justify-items: center;
} Quick facts
Initial value
legacyInherited
No
Applies to
all elements
Animation type
discrete
Values
normalstretchleftrightlegacycenteranchor-center justify-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.
Safe to use without fallbacks.
52+
20+
9+
12+