Flexbox & Grid
Utilities for controlling how items are justified and aligned at the same time.
Class | Styles |
---|---|
place-items-start | place-items: start; |
place-items-end | place-items: end; |
place-items-center | place-items: center; |
place-items-baseline | place-items: baseline; |
place-items-stretch | place-items: stretch; |
Use place-items-start
to place grid items on the start of their grid areas on both axes:
Use place-items-end
to place grid items on the end of their grid areas on both axes:
Use place-items-center
to place grid items on the center of their grid areas on both axes:
Use place-items-stretch
to stretch items along their grid areas on both axes:
Prefix a place-items
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<div class="grid place-items-start md:place-items-center ..."> <!-- ... --></div>
Learn more about using variants in the variants documentation.