I've been searching for a solution to this issue in the last 3 days with no result at all.
So, I have an HTML page that have to fit the window, and I'm using bootstrap 4.1.1. This page is pretty simple:
- 1 Header row, automatic or fixed height
- 1 Content row, have to fill the remaining window free space
The whole code is about 250 rows, so I'll try to write just an example of what I need:
<body>
<div id="header" class="container-fluid">
<!--Bootstrap rows and stuffs that actually work well
</div>
<div class="container-fluid">
<div class="row" id="main-row">
<!--FIRST COLUMN: SUMMARY-->
<div id="menu" class="col-2 box">
<!--Here i have a navbar menu-->
</div>
<!--SECOND COLUMN: CONTENT-->
<div id="content" class="col-8 box">
<!--Here i have contents: one video tag and one carousel-->
</div>
<!--THIRD COLUMN: DESCRITPION-->
<div id="description" class="col-2 box">
<!--Here i some text-->
</div>
</div>
</div>
I just need the whole second container-fluid (or the single row in it) to fill the rest of the window keeping every column at that height.
Here's what I've tried:
- Body and html height set to 100%;
- Tried with one big container for both header and content instead of two
- Set the second container's height to 100%/inherit/almostTriedEverything: and this is weird, it is actually set to 100% of window's height, but ignoring the header height (so I still have a vertical scrollbar)
- Lot of other things like table-like layout, flex (I would like to avoid it because of IE compatibility) and almost every solution found on the web
Fun fact: bootstrap columns ignore body height at all and they go over its bottom limit.