On this page
  1. justify-content
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

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.

Notes & Best Practices

Example

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

Linked from

Related notes