DEV Community

Discussion on: CSS Grid Blog

Collapse
 
stephanie profile image
Stephanie Handsteiner • Edited

justify-content aligns the grid-items along the x-axis (or inline-axis) and align-content aligns them along the y-axis (or block-axis).

That's the difference to Flexbox, where it's defined as main-axis (justify) vs. cross-axis (align), which is important because when you switch the direction of a flex-container (row -> column) they flip around.

It's also the same for -items and -self properties of justify and align in their scope.