# Flexbox Alignment: justify-content and align-items

justify-content spaces flex items along the main axis, align-items and align-self line them up across it, the two together center anything both ways, and an auto margin pushes one item to the far end.

![Cheat sheet: Flexbox Alignment: justify-content and align-items](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/86552a6cb06e47a3990a6d6dcec71f16.webp)

- Category: CSS
- Level: Apprentice
- Tags: Align items, Align self, Auto margin, CSS, Justify content
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/css-flexbox-alignment-cheat-sheet
