Style justifyContent Property
Make some space between the items of the flexible <div> element:
Try it yourself »
Definition and Usage
The justifyContent property aligns the flexible container's items when the items do not use all available space on the main-axis (horizontally).
Tip: Use the alignContent property to align the items on the cross-axis (vertically).
The justify-content property is supported in Firefox, Opera, and Chrome.
Return the justifyContent property:
Set the justifyContent property:
|flex-start||Default value. Items are positioned at the beginning of the container|
|flex-end||Items are positioned at the end of the container|
|center||Items are positioned at the center of the container|
|space-between||Items are positioned with space between the lines|
|space-around||Items are positioned with space before, between, and after the lines|
|initial||Sets this property to its default value. Read about initial|
|inherit||Inherits this property from its parent element. Read about inherit|
|Return Value:||A String, representing the justify-content property of an element|
CSS reference: justify-content property
HTML DOM STYLE Reference: alignContent property
HTML DOM STYLE Reference: alignItems property
HTML DOM STYLE Reference: alignSelf property
Thank You For Helping Us!
Your message has been sent to W3Schools.