Style alignContent Property
Position the items of the flexible <div> element with space between the lines:
document.getElementById("main").style.alignContent = "space-between";Try it Yourself »
The alignContent property aligns the flexible container's items when the items do not use all available space on the cross-axis (vertically).
Tip: Use the justifyContent property to align the items on the main-axis (horizontally).
Note: There must be multiple lines of items for this property to have any effect.
Return the alignContent property:
Set the alignContent property:
object.style.alignContent = "stretch|center|flex-start|flex-end|space-between|space-around|initial|inherit"
|Default value. Items are stretched to fit the container
|Items are positioned at the center of the container
|Items are positioned at the beginning of the container
|Items are positioned at the end of the container
|Items are positioned with space between the lines
|Items are positioned with space before, between, and after the lines
|Sets this property to its default value. Read about initial
|Inherits this property from its parent element. Read about inherit
|A String, representing the align-content property of an element
alignContent is a CSS3 (1999) feature.
It is fully supported in all browsers:
CSS reference: align-content property
HTML DOM STYLE Reference: alignItems property
HTML DOM STYLE Reference: alignSelf property
HTML DOM STYLE Reference: justifyContent property