Answer the question
In order to leave comments, you need to log in
How to offset the bootstrap 4 grid on tablets?
Hello, there is a website with a catalog,
on a PC there are 3 product cards in a row,
on mobile devices in a row, 1 product card (bootstrap adjusts them by itself).
On tablets, you need to make 2 rows of goods in a row, because at the moment the bootstrap is trying to fit all 3 cards, and it looks bad.
I re-read the bootstrap documentation, but I didn’t see how to do it, there was an option to do it by disabling the last product, but I didn’t like it, because in this case, significant products disappear.
Can you suggest how to implement this?
at the moment the code looks like this
<div class="row">
<div class="col-md-4">
Тут данные о товаре №1
</div>
<div class="col-md-4">
Тут данные о товаре №2
</div>
<div class="col-md-4">
Тут данные о товаре №3
</div>
</div>
Answer the question
In order to leave comments, you need to log in
you divided the columns into rows. You need to shove all ".col" into one ".row", it will turn out something like this:
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-12 col-12 mg">
<div class="project_block"></div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-12 mg">
<div class="project_block"></div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-12 mg">
<div class="project_block"></div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-12 mg">
<div class="project_block"></div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-12 mg">
<div class="project_block"></div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-12 mg">
<div class="project_block"></div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-12 col-12">
Тут данные о товаре №1
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-12">
Тут данные о товаре №2
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-12">
Тут данные о товаре №3
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question