I have created a header / footer, sidebar and scrolling main content as follows:
<div class="parent">
<div>HEADER</div>
<div class="main">
<div class="side">
SIDE
</div>
<div class="inner-main">
MAIN
<ul>
<li>testing 1.. 2.. 3..</li>
<li>testing 1.. 2.. 3..</li>
<!-- and so on... -->
</ul>
</div>
</div>
<div>FOOTER</div>
</div>
My CSS is as follows:
body {
height: 100vh;
width: 100%;
display: flex;
}
div.main {
display: flex;
flex-direction: row;
flex: 1 1 auto;
}
div.parent {
display: flex;
flex-direction: column;
background-color: green;
flex: 1 1 auto;
}
div.side {
background-color: #454545;
}
.inner-main {
background-color: pink;
flex: 1 1 auto;
overflow-y: scroll;
}
on chrome, the overflow-y
scrolling works as it should, and the browser does not have a scroll bar, the div.inner-main scrolls through the ul
as it should - shown below.
On all the other browsers, the browser creates an outer scrollbar, and the footer is not always displayed as it should be.
How do I correct this layout to have the inner scroller handle the overflow on firefox and (optionally) IE11?