If you want to utilize the bootstrap grid system, here's how you can do it:
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-lg-3 col-md-6 col-sm-6">col 1</div>
<div class="col-lg-3 col-md-6 col-sm-6">col 2</div>
<div class="col-lg-3 col-md-6 col-sm-6">col 3</div>
<div class="col-lg-3 col-md-6 col-sm-6">col 4</div>
</div>
Give it a try by clicking on "Run code snippet." You'll be able to see the demo for small screens. Then, click on "Full page" to view it on larger screens.
Bootstrap's grid system is designed for four screen sizes:
lg
for laptops and desktops - screens equal to or greater than 1200px wide
md
for small laptops - screens equal to or greater than 992px wide
sm
for tablets - screens equal to or greater than 768px wide
xs
for phones - screens less than 768px wide
The screen is divided into 12 parts, so the number after each screen size specifies how many parts the div
should cover.
For example, in the code provided above, the divs will cover 3 parts on large screens and 6 parts on small screens.
For more details on the bootstrap grid system, check out this resource.