Last updated: 27 August 2025

Tailwind CSS Justify Content

The justify-content utility class in Tailwind CSS allows you to control the alignment of flex items along the main axis of a flex container.


Tailwind Justify Content

The justify-content utilities in Tailwind control how flex items are placed along the main axis of a flex container. In plain terms—this decides where your items sit horizontally (in a row) or vertically (in a column).

How to Set Tailwind Justify Content

  • justify-start: items pack toward the start of the axis.

  • justify-end: items push to the far end.

  • justify-center: items gather in the middle.

  • justify-between: first item goes to the start, last item to the end, the rest spread evenly.

  • justify-around: items spread out with equal space around them, including at the edges.

  • justify-evenly: like around, but the gaps between items and edges are all the same size.

Tailwind justify-start

Items stick to the start of the axis.

html
<div class="flex justify-start....">
<div class="flex-1">A</div>
<div class="flex-1">B</div>
<div class="flex-1">C</div>
</div>

Preview

A

B

C

Tailwind justify-center

Everything sits in the middle.

html
<div class="flex justify-center....">
<div class="flex-1">A</div>
<div class="flex-1">B</div>
<div class="flex-1">C</div>
</div>

Preview

A

B

C

Tailwind justify-between

First item hugs the start, last hugs the end, everything else spreads out in between.

html
<div class="flex justify-between....">
<div class="flex-1">A</div>
<div class="flex-1">B</div>
<div class="flex-1">C</div>
</div>

Preview

A

B

C

Tailwind justify-around

Each item gets equal space around it—including at the edges.

html
<div class="flex justify-around....">
<div class="flex-1">A</div>
<div class="flex-1">B</div>
<div class="flex-1">C</div>
</div>

A

B

C

Tailwind justify-evenly

All gaps—including the ones on the outside edges—are the same.

html
<div class="flex justify-evenly....">
<div class="flex-1">A</div>
<div class="flex-1">B</div>
<div class="flex-1">C</div>
</div>

A

B

C

justify-content is one of the core flexbox tools you’ll use in Tailwind. Once you understand how each option handles spacing—start, center, between, around, evenly. You can quickly line up elements in whatever layout you need.

Tailwind Justify Content class Table

ClassProperties
justify-startjustify-content: flex-start;
justify-end justify-content: flex-end;
justify-centerjustify-content: center;
justify-betweenjustify-content: space-between;
justify-aroundjustify-content: space-around;
justify-evenlyjustify-content: space-evenly;

📚 Keep Exploring

Windframe Tailwind blocks

footer

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates