Skip to content

Align Content ​

Align content rows in multi-line flex container

Syntax ​

layout="content:[value]"

Values ​

ValueCSS OutputDescription
startalign-content: flex-startAlign to start
endalign-content: flex-endAlign to end
centeralign-content: centerCenter content
betweenalign-content: space-betweenSpace between rows
aroundalign-content: space-aroundSpace around rows
evenlyalign-content: space-evenlyEven spacing
stretchalign-content: stretchStretch rows

Examples ​

html
<div layout="flex wrap content:center">Centered rows</div>

Preview ​

Content Center ​

layout="content:center" - Center wrapped rows in multi-line container

1234
View Code
html
<div layout="flex wrap content:center" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 150px; max-width: 200px;">
  <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>
  <span space="p:small" visual="bg:primary text:white rounded:small">3</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">4</span>
</div>

Content Between ​

layout="content:between" - Space between wrapped rows

1234
View Code
html
<div layout="flex wrap content:between" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 150px; max-width: 200px;">
  <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>
  <span space="p:small" visual="bg:primary text:white rounded:small">3</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">4</span>
</div>