The justify-items property sets the default justify-self for items in a box. In grid, it aligns each item along the inline axis inside its grid area (left–right in a horizontal writing mode).
Put it on the container, not on each item. It is ignored in flexbox and table cells. To move the whole set of tracks inside a wider container, use justify-content. To override one item, use justify-self.
Standard-track.
Not deprecated. Grid keywords are widely available (Baseline since 2016). anchor-center is newer and still limited; prefer stretch, center, start, and end for study and production basics.
Syntax
CSS Syntax
syntax.css
justify-items:normal | stretch | center | start | end | initial | inherit;
Also valid: left, right, self-start, self-end, baseline, optional safe / unsafe, and legacy forms.
Values
Property Values
Value
Description
Try it
normal
In grid, usually acts like stretch (except some intrinsic / aspect-ratio boxes)
If every item already spans the cell (stretch or a width: 100%), center and start look identical. Shrink the content box first.
vs
Not justify-content
justify-content moves tracks inside the container. justify-items moves items inside cells. You often set both on the same grid for different jobs.
self
justify-self wins for one item
The container default comes from justify-items. A single child can override it with justify-self.
place
Shorthand: place-items
place-items sets align-items and justify-items together when both axes should share a keyword.
Compatibility
Browser Support
justify-items is a browser layout property (mainly CSS Grid). Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since 2016
justify-items
Chrome 57+, Firefox 45+, Safari 10.1+, Edge 16+. Internet Explorer has no grid justify-items support.
96%modern browsers
Google Chrome57+
Full support
Mozilla Firefox45+
Full support
Apple Safari10.1+
Full support
Microsoft Edge16+
Full support
Opera44+
Full support
Samsung Internet6.2+
Full support
Internet ExplorerNo support
None
justify-itemsWidely supported
Bottom line: Safe for modern grid layouts. Stick to stretch, center, start, and end for the widest, simplest study path. Newer keywords like anchor-center need extra care.
Remember
Key Takeaways
Role: default inline-axis alignment of items inside their areas (set on the container).
Best with grid: ignored in flexbox; teach it on display: grid.
Not justify-content: cells vs tracks—different jobs on the same grid.
Override: use justify-self on one item when the default should not apply.
One line:justify-items is the container default for how each grid item sits left–right inside its cell.
Frequently Asked Questions
It sets the default justify-self for items in a container. In grid, that means how each item aligns along the inline axis inside its grid area.
The initial value is legacy. In grid, the usual visible default is stretch-like sizing across the cell unless you set another keyword.
justify-items aligns each item inside its cell. justify-content distributes free space around the grid tracks when the grid is narrower than the container.
justify-items is set on the container and applies to all items. justify-self overrides that default on one item.
No. In flex layout the property is ignored. Use justify-content or align-items on the flex container instead.
Grid support is widely available: Chrome 57+, Firefox 45+, Safari 10.1+, and Edge 16+. It is a browser layout property, not a Node.js feature.