I am working on webpage which has 2 main rows, the top row has a fixed height of say 300px and does not change.
The bottom row needs to fill the height of the viewport/screen (the rest if the averrable space.)
Please see this wireframe as basic example: https://wireframe.cc/aUePUH
I have tried setting the body/html to 100% then the bottom row container to 100% making the 3 cols in that bottom row 100% height too but they only seem to go to 100% height of the content.
ideally I would like to set a minimum height on the bottom row and then for it to just expand and fill the viewport if more vertical space is available
I also ha d ago with height: 100vh but that didn't seem to do it.
<div class="container">
<div class="row top-row">
<p>Top Row with a fixed heigh - 300px</p>
</div>
<div class="row bottom-row">
<div class="col-xs-4">
<p>Col 1</p>
<p>
Should fill viewport/avaialable screen height
</p>
</div>
<div class="col-xs-4">
<p>Col 2</p>
<p>
Should fill viewport/avaialable screen height
</p>
</div>
<div class="col-xs-4">
<p>Col 3</p>
<p>
Should fill viewport/avaialable screen height
</p>
</div>
</div>
</div>
top-row {
height: 300px;
background-color: black;
color: white;
margin-bottom: 15px;
}
.bottom-row {
height: 100%;
}
.col-xs-4 {
background-color: red;
color: white;
}
Here is a JS FIDDLE example: https://jsfiddle.net/DTcHh/16054/