I'm working on a webapp which has a dashboard with a sidebar and a body. Sidebar is full height, scrollable sidebar. Following is the css class for the sidebar.
@media (min-width: 991px) {
.sidebar {
position: fixed;
top: 0;
left: 0;
bottom: 0;
/*z-index: 1000;*/
display: block;
background-color: #333333;
color: #ffffff;
}
}
On this sidebar, there is a button which opens a bootstrap modal with some information. The issue which I'm having right now is that the modal is opening on the background I can click on it or close it. (As you can see in the attachment_1)
To overcome this issue, what I did was changing position of the sidebar from fixed
to absolute
from the sidebar style class.
@media (min-width: 991px) {
.sidebar {
position: absolute;
top: 0;
left: 0;
bottom: 0;
/*z-index: 1000;*/
display: block;
background-color: #333333;
color: #ffffff;
}
}
But when I do that, even though the modal view is appearing as it should be (attachment_2), the alignment of the sidebar messes up as shown in the attachment_3
Can anyone please suggest me a way to overcome this issue with the requirements I have. If you can provide an example, I'd much appreciate that.
Thank you!