I'm in the process of creating a web page with a fixed left and right menu, while the middle content should be scrollable and positioned behind the menus. I've attempted to implement this using the following HTML and CSS, but encountered an error.
When I set the right menu to position: fixed, it appears on the right side, but everything works fine when it's position:relative.
Your prompt response would be greatly appreciated.
.mainBody {
display: block;
border: 0px solid #000;
max-height: 100%;
min-height: 500px;
position: relative;
}
.sidebar-left {
border: 0 solid #004087;
min-height: auto;
position: fixed;
z-index: 30;
}
You can view the full code snippet here.
In the screenshot below for reference, you can see that my right menu overlaps with the left menu when I apply position:fixed to the right menu: