Skip to content

Place Content

Shorthand for align-content and justify-content

Syntax

layout="place-content:[value]"

Values

ValueCSS OutputDescription
startplace-content: startStart alignment
endplace-content: endEnd alignment
centerplace-content: centerCenter alignment
betweenplace-content: space-betweenSpace between
aroundplace-content: space-aroundSpace around
evenlyplace-content: space-evenlyEven spacing
stretchplace-content: stretchStretch content

Examples

html
<div layout="grid place-content:center">Centered content</div>

Preview

Place Content Center

layout="place-content:center" - Center entire grid content in both directions

12
View Code
html
<div layout="grid grid-cols:2 place-content:center" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 120px;">
  <span space="p:small" visual="bg:primary text:white rounded:small">1</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">2</span>
</div>