I have set up a bootstrap grid layout that includes ads, and I wanted to integrate a section for banners within it. After some experimentation, I managed to achieve this by inserting a container between the ads and the banners, each housed in their own row. However, I am now facing an issue as shown in the image below.
Is there a solution to reposition the ads more effectively while minimizing unused empty space?
Note1: The number of columns adjusts based on screen size.
Note2: The number of banners in a row correlates with the column count (using the d-none trick).
https://i.sstatic.net/NFge9.png
<div class="container">
<div class="row">
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="container">
<div class="row">
<div class="col-3 banner">Banner</div>
<div class="col-3 banner">Banner</div>
<div class="col-3 banner d-sm-none d-md-block">Banner</div>
<div class="col-3 banner d-sm-none d-md-block">Banner</div>
</div>
</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
<div class="col-6 col-md-3 col-lg-3 ad">Ad</div>
</div>
</div>