Bootstrap 5 UI Tutorial

Build fast, responsive sites with Bootstrap 5

BS5 Flex

Bootstrap 5 Flex

Use flexbox utilities to quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more.

Basic Flex Classes

  • .d-flex - Creates a flexbox container
  • .flex-row or .flex-column - Sets direction
  • .justify-content-* - Aligns items horizontally (start, end, center, between, around)
  • .align-items-* - Aligns items vertically (start, end, center, baseline, stretch)

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics