Reputation: 1977
I'm trying to make a confirmation modal appear on a button click. The modal appears, but behind the background that 'grays out' the rest of the page.
Relevant CSS:
.reveal-modal-bg {
background: rgba(0,0,0,.75);
z-index:2000;
}
.reveal-modal {
border-radius:7px;
border:none;
padding:20px;
z-index:9999;
}
As you can see, the z-indices are being set correctly. The modal appears correctly on desktop in Chrome, however using Safari in iOS 9 causes the modal to appear incorrectly. Can you anyone tell me how to get it back in front of the background? Thank you in advance
Upvotes: 0
Views: 383
Reputation: 101
This works for me
.reveal-modal {
z-index:2000 !important;
-webkit-transform: translate3d(0,0,1px);
transform: translate3d(0,0,1px);
}
Upvotes: 2