Align Content β
Utilities for controlling the alignment of grid items within the grid container along the block (column) axis.
| Class Name | CSS Equivalent |
|---|---|
| content-start | align-content: start; |
| content-center | align-content: center; |
| content-end | align-content: end; |
| content-normal | align-content: normal; |
| content-stretch | align-content: stretch; |
| content-between | align-content: space-between; |
| content-around | align-content: space-around; |
| content-evenly | align-content: space-evenly; |
| content-baseline | align-content: baseline; |
Align Content Start β
The .content-start class sets the align-content property to start, aligning grid items along the block (column) axis at the start.
<div class="grid grid-cols-3 content-start">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content Center β
The .content-center class sets the align-content property to center, aligning grid items along the block (column) axis at the center.
<div class="grid grid-cols-3 content-center">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content End β
The .content-end class sets the align-content property to end, aligning grid items along the block (column) axis at the end.
<div class="grid grid-cols-3 content-end ">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content Normal β
The .content-normal class sets the align-content property to normal, allowing the browser to determine the alignment of grid items.
<div class="grid grid-cols-3 content-normal">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content Stretch β
The .content-stretch class sets the align-content property to stretch, allowing grid items to stretch along the block (column) axis.
<div class="grid grid-cols-3 content-stretch">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content Space Between β
The .content-between class sets the align-content property to space-between, distributing grid items evenly with space between them along the block (column) axis.
<div class="grid grid-cols-3 content-between">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content Space Around β
The .content-around class sets the align-content property to space-around, distributing grid items evenly with space around them along the block (column) axis.
<div class="grid grid-cols-3 content-around">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content Space Evenly β
The .content-evenly class sets the align-content property to space-evenly, distributing grid items evenly with space around and between them along the block (column) axis.
<div class="grid grid-cols-3 content-evenly">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
</div>Align Content Baseline β
Specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box's first or last baseline set with the corresponding baseline in the shared first or last baseline set of all the boxes in its baseline-sharing group.
