I am facing a situation where I have two side-by-side cards with nested rows containing dynamic content. My goal is to make sure that the height of each row in the first card matches the height of the corresponding row in the second card.
To achieve this, I need to calculate the heights as follows: height of A1 = max(height of A1, height of A2), height of A2 = max(height of A1, height of A2), height of B1 = max(height of B1, height of B2), height of B2 = max(height of B1, height of B2).
The code snippet for my setup looks like this:
<div class="row">
<div class="col-lg-6 mb-3">
<div class="card">
<div class="card-body">
<div id="a1" class="row">
...
</div>
<div id="b1" class="row">
...
</div>
</div>
</div>
</div>
<div class="col-lg-6 mb-3">
<div class="card">
<div class="card-body">
<div id="a2" class="row">
...
</div>
<div id="b2" class="row">
...
</div>
</div>
</div>
</div>
</div>
Currently, my layout looks like this:
https://i.sstatic.net/GbcYs.png
What I am aiming for is to achieve a layout similar to this:
https://i.sstatic.net/zBwSG.png
Is there a way to accomplish this using only Bootstrap 4 and CSS?