Align content
align-content property. It controls how extra space is distributed between items in a flex or grid container along the cross axis. flex-direction property sets the main and cross axis. The effects of align-content change based on the container's direction.| CSS Shortcut class | Applied style |
|---|---|
| |
| |
| |
| |
| |
| |
Examples
Around
align-content-around
In column layouts, the spacing appears horizontally between columns.
1
2
3
4
5
6
<div class="d-flex align-content-around">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
</div> Between
align-content-between
In column layouts, the spacing appears horizontally between columns.
1
2
3
4
5
6
<div class="d-flex align-content-between">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
</div> Evenly
align-content-evenly
In column layouts, the spacing appears horizontally between columns.
1
2
3
4
5
6
<div class="d-flex align-content-evenly">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
</div> Centre
align-content-center
In column layouts, the columns are centred horizontally.
1
2
3
4
5
6
<div class="d-flex align-content-center">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
</div> Start
align-content-start
In column layouts, the columns align to the left of the container.
1
2
3
4
5
6
<div class="d-flex align-content-start">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
</div> End
align-content-end
In column layouts, the rows align to the right of the container.
1
2
3
4
5
6
<div class="d-flex align-content-end">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
</div> xs:> 480pxsm:> 640pxmd:> 768pxlg:> 1024pxxl:> 1280px
<div class="xs:align-content-center ...">
...
</div>