Browse documentation
Reference / Flexbox & grid
Justify content
Distribute remaining space along the main axis of a flex layout or align grid tracks on the inline axis.
Working example
Space-between pins the outer items to opposite ends. It needs unoccupied space along the main axis to have a visible effect.
<header class="flex justify-between gap-3 border-b pb-2">
<strong>Print queue</strong>
<span>4 jobs</span>
</header>Class reference
| Class | CSS declarations |
|---|---|
justify-start | justify-content: flex-start; |
justify-center | justify-content: center; |
justify-end | justify-content: flex-end; |
justify-between | justify-content: space-between; |
justify-around | justify-content: space-around; |
justify-evenly | justify-content: space-evenly; |
justify-stretch | justify-content: stretch; |
View full generated CSS
.justify-around {
justify-content: space-around;
}
.justify-between {
justify-content: space-between;
}
.justify-center {
justify-content: center;
}
.justify-end {
justify-content: flex-end;
}
.justify-evenly {
justify-content: space-evenly;
}
.justify-start {
justify-content: flex-start;
}
.justify-stretch {
justify-content: stretch;
}