On this page
justify-content
Prev: `flex` | Up: layout | Next: `align-items`
Rel: layout, Display & Layout Guide
Ref: MDN Web Docs — justify-content
Tags: #public #web #css #properties #layout #tier/core
Syntax & Overview
justify-content: flex-start | center | space-between | space-evenly;
Aligns flex items or grid tracks along the inline/main axis.
- Initial:
normal| Inherited: No | Animatable: No
Notes & Best Practices
- Main-axis distribution: Common values are
space-between(navbars),center,flex-end, andspace-evenly.
Example
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
}
Linked from
Related notes
- tuts/css/properties/layout/align-items Linked here; links to this page; shared tags: #css, #layout, #properties, #tier, #web
- tuts/css/properties/layout/flex Linked here; links to this page; shared tags: #css, #layout, #properties, #tier, #web
- tuts/css/properties/layout Linked here; links to this page; shared tags: #css, #layout, #properties, #web
- tuts/css/properties/display_and_layout Linked here; shared tags: #css, #layout, #properties, #web
- tuts/css/properties/layout/display shared tags: #css, #layout, #properties, #tier, #web
- tuts/css/properties/layout/float shared tags: #css, #layout, #properties, #tier, #web
- tuts/css/properties/layout/gap shared tags: #css, #layout, #properties, #tier, #web
- tuts/css/properties/layout/grid-template-columns shared tags: #css, #layout, #properties, #tier, #web
- tuts/css/properties/box_model/aspect-ratio shared tags: #css, #properties, #tier, #web
- tuts/css/properties/box_model/box-sizing shared tags: #css, #properties, #tier, #web