Style justifyContent Property
Style justifyContent Property
The justifyContent property is used to align flexible items horizontally i.e, on the main axis. It only happens when the items do not use all available space. For aligning them vertically, use alignContent property.
Syntax:-
Its syntax is:- object.style.justifyContent OR object.style.justifyContent = flex-start | flex-end | center | space-between | space-around | initial | inherit
Return:-
Its return is:- string having justify-content property of an element
Further Explanation:-
Value | Description |
---|---|
flex-start | Items are positioned at beginning of container. |
flex-end | Items are positioned at end of container. |
center | Items are positioned at center of container. |
space-between | Items are positioned with space between lines. |
space-around | Items are positioned with space before, between, and after lines. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |