CSS Justify Content
Control spacing between items in flex layouts and understand how elements are distributed across available space.
David Miller
December 2, 2025
9.3k256
Justify-content controls **horizontal spacing**.
## Common values
- flex-start
- center
- space-between
- space-around
## Example
```css
.container {
display: flex;
justify-content: space-between;
}
```
## UI Visualization
- First item left
- Last item right
- Space in between
## Real-world example
- Navbar items
- Action buttons
## Tip
This property works on main axis.
#CSS#Beginner