Using the bootstrap I created three columns. Within each column I have several rows.
My problem is that the columns are not the same height, the left column is bigger than the rest, they were supposed to all be the same height.
In the cards I did not define any height, that is, if any of the columns increased the height, the rest would follow this growth automatically in order to have all the same height.
Is there a way to place all the columns at the same height without using measurements in pixels (px)?
Thanks
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" />
<div class="col-3">
<div class="row">
<div class="col" style="padding-right:0">
<div class="card cardm">
<div class="card-body" style="overflow-y: auto;">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col" style="padding-right:0">
<div class="card cardm">
<div class="card-body">
</div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="row">
<div class="col">
<div class="card cardm">
<div class="card-body">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card cardm">
<div class="card-body">
</div>
</div>
</div>
</div>
2
Answers
Done with js, just copied from the duplicate linked post. Shows weird on a small screen though.
If you are using
Bootstrap4
then you can easilyachieve by BS4 predefined classes
likeh-100
and also your html structure is not correct way so follow as per bootstrap instructions.Predefined classes for width & height follow:
https://getbootstrap.com/docs/4.3/utilities/sizing/#relative-to-the-parent