CSS: justify-content
CSS property justify-content
distributes space along the main axis.
Position values
Positional alignment
justify-content: flex-start-
default.
Aligns items to the start of the main axis. Ignores writing direction. Works only in Flexbox.
123 justify-content: flex-endjustify-content: start-
Aligns items to the start of the main axis. Respect writing direction. Works in both Flexbox and Grid.
justify-content: endjustify-content: left-
Forces alignment to the left side. Ignores writing direction. Only works in Flexbox, not in Grid.
justify-content: rightjustify-content: center-
123
Normal alignment
justify-content: normal-
- In Flexbox, it means
flex-start. - In Grid, it means
start.
- In Flexbox, it means
Distributed alignment
justify-content: space-between-
123
justify-content: space-around-
123
justify-content: space-evenly-
123
justify-content: stretch- xtodo
Overflow alignment (for positional alignment only)
Overflow alignment (for positional alignment only)
justify-content: safe center- xtodo
justify-content: unsafe center- xtodo