When using bootstrap with jQuery dialog, I encountered a strange issue. If the z-index of the dialog is set to 1 or higher in a standalone script, everything works fine. However, when the same script is called inside an iframe, the dialog ends up appearing underneath other elements on the page. Even more oddly, when I try to close the dialog, I find that the semi-transparent layer is actually on top of the dialog itself.
.ui-dialog {
z-index:99999999 !important;
}
.ui-widget-overlay {
position: fixed;
z-index:99999999 !important;
}
.ui-dialog {
z-index:99999999 !important;
}
.fixed-dialog {
position: fixed;
top: 50px;
left: 50px;
z-index:99999999 !important;
}
.ui-dialog-titlebar {
border-left: 30px solid transparent;
min-height:40px;
background-color:#f09;
background-image:url(images/yellow_alert_icon.png);
background-position: -22px 8px;
background-repeat:no-repeat;
z-index:99999999 !important;
}
I'm quite puzzled by this!
UPDATED CLARIFICATION: The iframe is empty, containing no other elements. It is solely used as a dialog. Therefore, the code inside the iframe mirrors the parent script. The parent script works perfectly on its own, but when placed inside the iframe, the jquery dialog appears underneath the parent script.