![]() |
VOOZH | about |
Bootstrap 5 Flex Align Content provides utilities for aligning flex items along the cross-axis. Options include start, end, center, around, and stretch, accommodating various layout requirements across different screen sizes.
Bootstrap 5 Flex Align Content Classes:
| Class | Description |
|---|---|
| align-content-start | Aligns content to the start of the cross-axis for all screen sizes. |
| align-content-end | Aligns content to the end of the cross-axis for all screen sizes. |
| align-content-center | Aligns content to the center of the cross-axis for all screen sizes. |
| align-content-around | Aligns content around the cross-axis for all screen sizes. |
| align-content-stretch | Aligns content to stretch across the cross-axis for all screen sizes. |
Syntax:
<div class="d-flex flex-wrap align-content-*">
...
</div>Example 1: In this example, we align the content to the start and the center of the cross-axis using align content classes.
Output:
👁 Bootstrap 5 Flex Align ContentExample 2: In this example, we align the content to the around and the end of the cross axis using align content classes.
Output:
👁 Bootstrap 5 Flex Align Content