Reputation: 69
I have made a modal which is displaying in footer but when the modal appears it overlaps the overall div and make the side bar unclickable.
Here is the code:
<footer>
<div class="modal custom show" id="trackModal" role="dialog" aria-labelledby="trackModalLabel" aria-hidden="false">
<div class="modal-dialog" id="popup">
<div class="modal-content">
<img id="popclose" src="~/Content/MediaCenter/assets/images/cookies.jpg">
</div>
</div>
</div>
<footer>
Here is the css
div#popup {
left: 18%;
}
div#trackModal {
z-index: 1049;
}
.modal.custom .modal-dialog {
position: fixed;
bottom: 0;
right: 0;
margin: 0;
content: "";
width: 130%;
display: none;
}
I have tried visibility:hidden
; overflow-x:auto
and overflow-y:auto
. But result remains the same.
Please if anyone can help?
Upvotes: 0
Views: 597
Reputation: 33
Use Z-index property to the model like this:
.modal.custom .modal-dialog {
position: fixed;
bottom: 0;
right: 0;
margin: 0;
content: "";
width: 130%;
display: none;
z-index: -1;
}
so now, side bar will goes front of your model. Try it.
Upvotes: 1