I have the following Bootstrap code:
<div>
<div class="col-md-5"></div>
<div class="col-md-7"></div>
</div>
How to display these two blocks in full width in small displays? Now it displayed under each other.
Now
1
2
Required
1 2
I have the following Bootstrap code:
<div>
<div class="col-md-5"></div>
<div class="col-md-7"></div>
</div>
How to display these two blocks in full width in small displays? Now it displayed under each other.
Now
1
2
Required
1 2
In Bootstrap 4, use the xs breakpoint for non stacking columns. This is the default breakpoint so you don't need to use the xs
infix in your markup...
<div class="row">
<div class="col-5">1</div>
<div class="col-7">2</div>
</div>
<div>
<div class="col-md-5 col-sm-5 col-xs-5"></div>
<div class="col-md-7 col-sm-7 col-xs-7"></div>
</div>
You have to declare the size of your col for the @media less than medium
Extra small devices Phones (<768px) - col-xs-*
Small devices Tablets (≥768px) - col-sm-*
Medium devices Desktops (≥992px) - col-md-*
Large devices Desktops (≥1200px) - col-lg-*