Skip to main content

Overview

Justify utilities control how flex items are distributed along the main axis. Use them to push items to the start, center, end, or spread them across the available space.
ClassCSS
.justify-startjustify-content: flex-start;
.justify-centerjustify-content: center;
.justify-endjustify-content: flex-end;
.justify-betweenjustify-content: space-between;
.justify-aroundjustify-content: space-around;
.justify-evenlyjustify-content: space-evenly;
Responsive justify-*--on-* variants are also bundled.

Start

.justify-start packs items toward the start of the main axis. This is the default behavior for flex containers.
<div class="elementor-element flex justify-start gap-4">
  <div class="p-4 bg-primary text-white rounded">
    01
  </div>
  <div class="p-4 bg-primary text-white rounded">
    02
  </div>
  <div class="p-4 bg-primary text-white rounded">
    03
  </div>
</div>

Center

.justify-center groups items in the center of the container. This is commonly used for centered hero content, modal actions, and single-row centered navigation.
<div class="elementor-element flex justify-center gap-4">
  <div class="p-4 bg-primary text-white rounded">
    01
  </div>
  <div class="p-4 bg-primary text-white rounded">
    02
  </div>
  <div class="p-4 bg-primary text-white rounded">
    03
  </div>
</div>

End

.justify-end packs items toward the end of the main axis. Use this for right-aligned button groups and trailing actions.
<div class="elementor-element flex justify-end gap-4">
  <div class="p-4 bg-primary text-white rounded">
    01
  </div>
  <div class="p-4 bg-primary text-white rounded">
    02
  </div>
  <div class="p-4 bg-primary text-white rounded">
    03
  </div>
</div>

Between

.justify-between places the first item at the start and the last item at the end, with equal space between the rest. This is the go-to for header layouts with a logo on one side and navigation on the other.
<div class="elementor-element flex items-center justify-between gap-4">
  <h2 class="text-xl font-bold">
    Logo
  </h2>
  <nav class="flex gap-4">
    <a href="#">
      Docs
    </a>
    <a href="#">
      Pricing
    </a>
  </nav>
</div>

Around

.justify-around distributes equal space around each item. The outer edges get half the space of the gaps between items.
<div class="elementor-element flex justify-around">
  <div class="p-4 bg-primary text-white rounded">
    01
  </div>
  <div class="p-4 bg-primary text-white rounded">
    02
  </div>
  <div class="p-4 bg-primary text-white rounded">
    03
  </div>
</div>

Evenly

.justify-evenly distributes perfectly equal space between all items and the container edges. Every gap is the same size.
<div class="elementor-element flex justify-evenly">
  <div class="p-4 bg-primary text-white rounded">
    01
  </div>
  <div class="p-4 bg-primary text-white rounded">
    02
  </div>
  <div class="p-4 bg-primary text-white rounded">
    03
  </div>
</div>

Best Practices

  • Use justify helpers when the space should be distributed across the main axis.
  • Pair with items-* when both axes need deliberate control.
  • Keep .gap-* in the container when you still want fixed spacing between siblings.

Align Items

Control the cross-axis for the full line

Gap

Keep consistent spacing while changing distribution