Align the items of the flexible <div> element:
The align-content property aligns the flexible container's items when the items do not use all available space on the cross-axis (vertically).
Tip: Use the justify-content 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.
Default value: | stretch |
---|---|
Inherited: | no |
Animatable: | no. Read about animatable |
Version: | CSS3 |
JavaScript syntax: | object.style.alignContent="center" Try it |
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -webkit- specify the first version that worked with a prefix.
Property | |||||
---|---|---|---|---|---|
align-content | 21.0 | 11.0 | 28.0 | 7.0 -webkit- | 12.1 |
Value | Description | Play it |
---|---|---|
stretch | Default value. Items are stretched to fit the container | Play it » |
center | Items are positioned at the center of the container | Play it » |
flex-start | Items are positioned at the beginning of the container | Play it » |
flex-end | Items are positioned at the end of the container | Play it » |
space-between | Items are positioned with space between the lines | Play it » |
space-around | Items are positioned with space before, between, and after the lines | Play it » |
initial | Sets this property to its default value. Read about initial | Play it » |
inherit | Inherits this property from its parent element. Read about inherit |
CSS Reference: align-items property
CSS Reference: align-self property
CSS Reference: justify-content property
HTML DOM reference: alignContent property