CSS justify-content property


CSS justify-content property aligns the content horizontally (along main/inline/row axis).


justify-content : normal | center | flex-start | flex-end | space-between | space-around | space-evenly

Property values


It is the default value and places elements at the start.

justify-content: normal;


It aligns the content elements at the middle of cotainer.

justify-content: center;


flex-start aligns the content at the start of flex container.

justify-content: flex-start;


flex-end aligns the content at the end of the flex container.

justify-content: flex-end;


In this case, first object is aligned at the start of container and last object is aligned at the end of the container. The remaining objects are placed in such a way that white space is distributed equally among any two objects. Learn more about css space between

justify-content: space-between;


The objects are distributed in such a way that there is same space between the objects except at the start and end of the container. There is half sized space (half of the space that is between any two objects) before the first object and after the last object.

justify-content: space-around;


It adjusts the alignment of objects so as to distribute equal space between and around the objects.

justify-content: space-evenly;

Applicable to

It applies to multicol containers, flex containers, and grid containers.

#CSS digger
Was this article helpful?


#First 1

#Second 2

#Third 3