Currently using Bootstrap v4 with a two-column layout that splits the container in half. On larger screens, the items in each column display correctly. However, on smaller screens, Bootstrap shuffles the items from column 2 into column 1.
I am looking to achieve a different effect where the items from column 2 stack under or after all the items in column 1, rather than being shuffled together. I have provided a JSFiddle to demonstrate my desired outcome.
Any assistance would be greatly appreciated. Cheers!
.row {
background: #f8f9fa;
margin-top: 20px;
}
.col-md-6 {
border: solid 1px #6c757d;
padding: 10px;
}
<!--
Bootstrap docs: https://getbootstrap.com/docs
-->
<div class="container">
<lable><strong>Normal 2 Column on medium/big screen</strong></lable>
<div class="row">
<div class="col-md-6" style="background-color: green; margin-bottom: 15px;">A1</div>
<div class="col-md-6" style="background-color: yellow; margin-bottom: 15px;">B1</div>
<div class="col-md-6" style="background-color: green; margin-bottom: 15px;">A2</div>
<div class="col-md-6" style="background-color: yellow; margin-bottom: 15px;">B2</div>
<div class="col-md-6" style="background-color: green; margin-bottom: 15px;">A3</div>
</div>
</div>
<div class="container">
<lable><strong>Common Responsive 2 Column on small/mobile screen</strong></lable>
<div class="row">
<div class="col-md-6" style="background-color: green">A1</div>
</div>
<div class="row">
<div class="col-md-6" style="background-color: yellow">B1</div>
</div>
<div class="row">
<div class="col-md-6" style="background-color: green">A2</div>
</div>
<div class="row">
<div class="col-md-6" style="background-color: yellow">B2</div>
</div>
<div class="row">
<div class="col-md-6" style="background-color: green">A3</div>
</div>
</div>
<div class="container">
<lable><strong>DESIRED Responsive 2 Column on small/mobile screen</strong></lable>
<div class="row">
<div class="col-md-6" style="background-color: green">A1</div>
</div>
<div class="row">
<div class="col-md-6" style="background-color: green">A2</div>
</div>
<div class="row">
<div class="col-md-6" style="background-color: green">A3</div>
</div>
<div class="row">
<div class="col-md-6" style="background-color: yellow">B1</div>
</div> <div class="row">
<div class="col-md-6" style="background-color: yellow">B2</div>
</div>
</div>