Place Items β
Utilities for controlling the placement of grid items within the grid container.
| Class Name | CSS Equivalent |
|---|---|
| place-items-start | place-items: start; |
| place-items-center | place-items: center; |
| place-items-end | place-items: end; |
| place-items-stretch | place-items: stretch; |
| place-items-baseline | place-items: baseline; |
Place Items Start β
The .place-items-start class sets the place-items property to start, aligning grid items at the start of the grid container.
<div class="grid grid-cols-3 place-items-start">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Items Center β
The .place-items-center class sets the place-items property to center, aligning grid items at the center of the grid container.
<div class="grid grid-cols-3 place-items-center">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Items End β
The .place-items-end class sets the place-items property to end, aligning grid items at the end of the grid container.
<div class="grid grid-cols-3 place-items-end">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Items Stretch β
The .place-items-stretch class sets the place-items property to stretch, allowing grid items to stretch and fill the grid container.
<div class="grid grid-cols-3 place-items-stretch">
<div class="[...]">1</div>
<div class="[...]">2</div>
<div class="[...]">3</div>
<div class="[...]">4</div>
<div class="[...]">5</div>
<div class="[...]">6</div>
</div>Place Items Baseline β
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.
