I have this code in bootstrap:
https://jsfiddle.net/s18okje4/
<div class="row no-gutters">
<div class="col-12">
</div>
<div class="col-12">
</div>
</div>
.row {
background: #f8f9fa;
display:flex;
height:100%;
}
.col-12 {
border: solid 1px #6c757d;
height: 100%;
}
I want the height of each .col-12 to cover all the space that it can occupy divided by the number of .col-12 that exist under the same parent (something similar to how flexbox works).
In my example I have a .row that I want to occupy 100% of the screen (this is the parent element) and its children in this case exist 2 .col-12 I want them to occupy the same height as it exists.
I know that this could be solved by putting 50% and 50% of height to each div, but I am looking for a dynamic and responsive solution, in this example I have 2 elements but they can be n and I would like to know the best way to do it and not have to modify my css code in every change. Thank you very much
this is my desired effect:
