In my design, I have a top menu with a z-index of 999 to ensure nothing covers it. However, I am facing an issue where a scrolling div is appearing on top of the menu bar even though it shouldn't. Any idea why this is happening?
Here is the CSS for the scrolling div:
.product-viewer {
width: 85%;
margin-left: 15%;
display: inline-block;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
height: 300px;
background-color: #202020;
overflow-y: hidden;
overflow-x: scroll;
-webkit-overflow-scrolling: touch;
white-space: nowrap;
z-index: 0;
}
The CSS for the menu bar (with additional styling when fixed in position):
#menu {
width: 100%;
height: 50px;
background-color: rgba(0, 0, 0, 0.8);
background-blend-mode: hard-light;
text-align: center;
overflow: hidden;
line-height: 50px;
display: inline-block;
}
#menu.fix {
position: fixed;
left: 0;
top: 0;
z-index: 999;
}
For more information, visit: