Skip to content

Place

Align items and content on both axes at once.

place sets both axes of place-content in one modifier: the first word is the block axis (align-content), the second the inline axis (justify-content). place:center centers on both.

PropertyCompiles toExample
placeplace-contentplace:center
place-selfplace-selfplace-self:end-start

Both take the same values:

GroupValues
Single word, both axescenter, start, end, stretch-stretch
Two positionscenter-start, center-end, center-stretch, start-center, start-end, start-stretch, end-center, end-start, end-stretch, stretch-center, stretch-start, stretch-end
Baselinesbaseline-center, baseline-stretch, first-baseline-center, first-baseline-stretch, last-baseline-center, last-baseline-stretch
Distributionspace-between-center, space-between-start, space-between-end, space-between-stretch, space-around-center, space-around-start, space-around-end, space-around-stretch, space-evenly-center, space-evenly-start, space-evenly-end, space-evenly-stretch, stretch-space-between, stretch-space-around, stretch-space-evenly
Globalinherit, initial, revert, revert-layer, unset
Center one thing in a grid cell
<div class="grid place:center h:c11">…</div>

One axis at a time

PropertyValuesCompiles toExample
align-selfalign-start, align-end, align-center, align-stretch, align-baseline, align-self-start, align-self-endalign-selfalign-self:align-center
justify-selfjust-start, just-end, just-center, just-stretch, just-baseline, just-self-start, just-self-endjustify-selfjustify-self:just-end

Inside a flex row or column, child is the shorter way to align one item.