Style alignContent Property
Align the items of the flexible <div> element:
Try it yourself »
Definition and Usage
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.
The alignContent property is supported in IE11, Firefox, Opera and Chrome.
The alignContent property is not supported in Internet Explorer 10 and earlier versions or Safari.
Return the alignContent property:
Set the alignContent property:
|stretch||Default value. Items are stretched to fit the container|
|center||Items are positioned at the center of the container|
|flex-start||Items are positioned at the beginning of the container|
|flex-end||Items are positioned at the end 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 align-content property of an element|
CSS reference: align-content property
HTML DOM STYLE Reference: alignItems property
HTML DOM STYLE Reference: alignSelf property
HTML DOM STYLE Reference: justifyContent property
Thank You For Helping Us!
Your message has been sent to W3Schools.