{"id":21085,"date":"2013-04-17T10:07:08","date_gmt":"2013-04-17T17:07:08","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=21085"},"modified":"2021-07-28T11:24:38","modified_gmt":"2021-07-28T18:24:38","slug":"align-content","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/a\/align-content\/","title":{"rendered":"align-content"},"content":{"rendered":"\n
The It helps to align a flex container\u2019s lines within it when there is extra space in the cross-axis, similar to how Note, this property has no effect when the flexbox has only a single line.<\/em><\/p>\n\n\n\n The The following figure helps understand how the lines are stacked up in a flex container depending on the The following demo shows how lines are stacked out depending on the align-content<\/code> property is a sub-property of the Flexible Box Layout module<\/a>.<\/p>\n\n\n\n
justify-content<\/code> aligns individual items within the main-axis.<\/p>\n\n\n\n
align-content<\/code> property accepts 6 different values:<\/p>\n\n\n\n
flex-start<\/code>: lines packed to the start of the container<\/li>
flex-end<\/code>: lines packed to the end of the container<\/li>
center<\/code>: lines packed to the center of the container<\/li>
space-between<\/code>: lines evenly distributed; the first line is at the start of the container while the last one is at the end<\/li>
space-around<\/code>: lines evenly distributed with equal space between them<\/li>
stretch<\/code> (default<\/strong>): lines stretch to take up the remaining space<\/li><\/ul>\n\n\n\n
align-content<\/code> value:<\/p>\n\n\n\n
<\/a>Syntax<\/h3>\n\n\n
align-content: flex-start | flex-end | center | space-between | space-around | stretch\n\n.flex-container {\n align-content: space-around;\n}<\/code><\/pre>\n\n\n
<\/a>Demo<\/h3>\n\n\n
align-content<\/code> value:<\/p>\n\n\n\n
flex-start<\/code><\/li>
flex-end<\/code><\/li>
center<\/code><\/li>
space-between<\/code><\/li>
space-around<\/code><\/li>
stretch<\/code><\/li><\/ul>\n\n\n\n