Back to CSS Notes
Topic #173

Flexbox Justify Content

justify-content distributes items along the main axis — start, centre, space-between. It is the property that centres content instantly.


CSS justify-content Property

The justify-content property aligns the flex items along the main-axis (horizontally).

This property can have one of the following values:

  • center
  • flex-start (default)
  • flex-end
  • space-around
  • space-between
  • space-evenly

Example

  .flex-container {

  display: flex;

  justify-content: center;
}

Example

  .flex-container {

  display: flex;

  justify-content: flex-start;
}

Example

  .flex-container {

  display: flex;

  justify-content: flex-end;
}

Example

  .flex-container {

  display: flex;

  justify-content: space-around;
}

Example

  .flex-container {

  display: flex;

  justify-content: space-between;
}

Example

  .flex-container {

  display: flex;

  justify-content: space-evenly;
}

Want to go beyond the notes?

Join Coding Now Tech Institute's CSS course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Flexbox Justify Content – FAQs

Quick answers about learning Flexbox Justify Content in CSS.

This free note from Coding Now Tech Institute explains Flexbox Justify Content in CSS — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every CSS topic on Coding Now Tech Institute, including Flexbox Justify Content, is 100% free with no signup required.
With focused practice, most students grasp Flexbox Justify Content in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now