CSS justify-content Property Explained

What the CSS justify-content property does, with an example.

Published November 3, 2026

The CSS justify-content property aligns flex or grid items along the main axis of their container.

Key points

  • Check browser compatibility on a resource like caniuse.com if targeting older browsers

Example

justify-content: space-between;
More CSS articles