Place Self β
Utilities for controlling the placement of individual grid items within the grid container.
| Class Name | CSS Equivalent |
|---|---|
| place-self-auto | place-self: auto; |
| place-self-start | place-self: start; |
| place-self-center | place-self: center; |
| place-self-end | place-self: end; |
| place-self-stretch | place-self: stretch; |
Place Self Auto β
The .place-self-auto class sets the place-self property to auto, allowing the grid item to be placed according to its normal position.
html
<div class="grid grid-cols-3 place-items-stretch">
<div class="[...]">1</div>
<div class="[...] place-self-auto">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Self Start β
The .place-self-start class sets the place-self property to start, aligning the grid item at the start of the grid container.
html
<div class="grid grid-cols-3 place-items-stretch">
<div class="[...]">1</div>
<div class="[...] place-self-start">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Self Center β
The .place-self-center class sets the place-self property to center, aligning the grid item at the center of the grid container.
html
<div class="grid grid-cols-3 place-items-stretch">
<div class="[...]">1</div>
<div class="[...] place-self-center">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Self End β
The .place-self-end class sets the place-self property to end, aligning the grid item at the end of the grid container.
html
<div class="grid grid-cols-3 place-items-stretch">
<div class="[...]">1</div>
<div class="[...] place-self-end">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Self Stretch β
The .place-self-stretch class sets the place-self property to stretch, allowing the grid item to stretch and fill the grid container.
html
<div class="grid grid-cols-3 place-items-center">
<div class="[...]">1</div>
<div class="[...] place-self-stretch">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>