I'm working with two ID selectors, 'top' and 'bottom'. The 'top' div has a "position: relative" setting while the 'bottom' div has a fixed position and overlaps the 'top' div. I have also set an "overflow:auto" property on the 'bottom' div.
The issue arises when scrolling the content inside the 'bottom' div in Internet Explorer browser. The content inside the 'top' div also scrolls along with it.
My goal is to ensure that when scrolling the content inside the 'bottom' div (with position: fixed), only that content should scroll. The content within the 'top' div should remain static.
div#top {
width: 90%;
margin: auto;
height: 900px;
background: #f5e3ce;
position: relative;
z-index: -1
}
div#bottom {
width: 90%;
height: 50vh;
margin: auto;
position: fixed;
background: darkgrey;
bottom: 0;
overflow: auto;
z-index: 4;
left: 75px;
}
<div id="top">
<div class="content">
<p>
*Adempas information...
</p>
<p>
*More Adempas details...
</p>
</div>
</div>
<div id="bottom">
<div class="content">
<p>
*Additional Adempas info...
</p>
<p>
*Even more Adempas details...
</p>
</div>
</div>