I'm having some difficulties creating a layout with Bootstrap 3.3.7.
I've set up a fiddle to show what I've got: https://jsfiddle.net/b8ukxb41/5/
There are 3 issues with what I have which I can't seem to resolve:
I want the left hand navigation menu (outlined with the red border) to be the same height as the content area (outlined with the blue border).
The footer should always be at the "bottom" of the browser window, regardless of how much content is inside the content area. I do not want a sticky footer - if a scrollbar appears in the browser the footer should always be at the bottom of the browser window, not appear sticky.
If there is a large amount of content in the content area, it should have a scroll bar on the right hand side. However the left hand navigation menu should remain in a fixed position.
The closest thing I can describe this to is like Gmail where you can scroll down the list of messages on the right, but the folder navigation on the left remains in a fixed position - and that the left column goes all the way down to the bottom of the browser window.
I've tried the following to resolve the issues, but none of these solutions work:
Using
display: flex;
on the container with the green border, i.e.<div class="container-fluid" style="border:1px solid green; display: flex;">
. This doesn't seem to do anything. I based this on information in How can I make Bootstrap columns all the same height?I've tried using the following CSS for the footer:
footer { position: absolute; right: 0; bottom: 0; left: 0; }
The trouble with this is that sometimes the footer appears "inside" the navigation menu with the red border. It only appears right at the bottom of the browser window if you've scrolled right to the bottom of the window.
- I don't know how to do this although the effect I'm going for is as per what's shown here: https://codepen.io/sass-munch/pen/YerOLG
The overall thing I'm trying to achieve is summarised by this diagram: The red bordered nav should be the same height as the blue bordered content area. The header should be fixed. The footer should always appear at the bottom of the browser window - irrespective of how much content there is in the blue content area: