align-content
Lesson 9 of 15 in Coddy's CSS Flexbox - The Complete Course course.
The align-content property defines the alignment within the lines of the flexbox if there is extra space in the cross-axis.
It is working similar to how justify-content aligns individual items within the main-axis.
It accepts six values:
flex-startflex-endcenterstretchspace-betweenspace-around
Example,
.container {
display: flex;
align-content: space-around;
}Challenge
EasyDefine the alignment along the lines of the given flexbox to space-between, also add to the flexbox wrap property.
You should try all the values!
Try it yourself
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
<div>12</div>
</div>
</body>
</html>All lessons in CSS Flexbox - The Complete Course
2Flex Container
Flexboxflex-directionflex-wrapflex-flowjustify-contentalign-itemsalign-contentgapPerfect Center