How can I make bootstrap 4.5 one column height change bigger so that there would be no gaps in the grid? See the picture below (test 2 and test 4 columns should be with no gap and ONLY test 1 should be higher, other the same height).
Start position is that all the columns are equal height. I might use jquery to expand the "test 1" column.
Relevant code here:
<div class="container">
<div class="row">
<div class="col-lg-6">
<div class="row">
<div class="col-lg-6" style="height: 400px; background: #eee; border: 1px solid #333;">
test 1
</div>
<div class="col-lg-6" style="height: 200px; background: #eee; border: 1px solid #333;">
test 2
</div>
<div class="col-lg-6" style="height: 200px; background: #eee; border: 1px solid #333;">
test 3
</div>
<div class="col-lg-6" style="height: 200px; background: #eee; border: 1px solid #333;">
test 4
</div>
</div>
</div>
</div>
</div>
3
Answers
I can get it working with two flex columns but then the order does not work in phone layout (it will be 1,3,...). See the images:
You could just use
min-height: 200px;
instead of just setting the height.And actually this is possible by making my own float columns. They seem to work without gaps (float left always fills the space correctly).