Skip to main content

Grid Stacked horizontal in Bootstrap 5

Bootstrap Grid Stacked to horizontal

To make the Bootstrap 5 grid stack horizontally instead of vertically, you can make use of the flexbox utilities provided by Bootstrap.

As an example:

Editor

Loading...

In this example:

  • The flex-row class is added to the row element to make the columns stack horizontally.
  • Each column is represented by a div with the col class.
  • The bg-primary and bg-dark classes are used to set background colors for demonstration purposes.

By using the flex-row class, the columns will stack horizontally instead of vertically. Feel free to modify the code according to your requirements. Let me know if you have any further questions!