I am trying to get bootstrap 3 to ensure all the columns are the same height across the page.
I can get this to work when I have 3 columns much like the example here: How can I make Bootstrap columns all the same height?
The issue I am having is that I want to have nested columns and these nested columns will need to be x% each equalling up to 100% of the height of the largest parent column. I can't seem to find a solution to nested columns.
So I need the nested columns to fill their parent column depending on the height percent provided to the nested columns css.
The css height percentage will be provided via jquery .css()
.row {
display: table;
}
.row [class*="col-"] {
float: none;
display: table-cell;
vertical-align: top;
}
<div class="container">
<div class="row">
<div class="col-sm-3 ">
<img src="http://placehold.it/250x450">
</div>
<div class="col-sm-3 " style="background-color: grey">
<div class="row">
<div class="col-sm-12 " style="background-color: green">30%</div>
</div>
<div class="row">
<div class="col-sm-12 " style="background-color: blue">20%</div>
</div>
<div class="row">
<div class="col-sm-12 " style="background-color: red">50%</div>
</div>
</div>
<div class="col-sm-3 " style="background-color: grey">
<div class="row">
<div class="col-xs-12 " style="background-color: green">25%</div>
</div>
<div class="row">
<div class="col-xs-12 " style="background-color: orange">75%</div>
</div>
</div>
<div class="col-sm-3 " style="background-color: blue">
100%
</div>
</div>