I have a web page that contains a div element called #order_details that is hidden. When a user clicks on a button, then the #order_details div element appears. It appears that the div element has a z-index of 6500 which I have verified is the highest z-index in the entire site. It is also using jQuery because I see code like:
$('#order_details').show();
which I know shows the #order_details div element.
<html>
...
...
<div id="button"></div>
<div id="order_details">
<div id="button2launch_SURVEY"></div>
<div id="survey">
</div>
</div>
</html>
Now I’ve added a new div element called #survey and when I click on a button in the #order_details div I want the survey to appear on the top.
I have set the z-index in the css #survey to be 6599. Then I setup some jQuery to show the div.
$('#survey').show();
the #survey div appears, but it is not on top of the #order_details div.
My question is:
Isn’t setting the z-index property of #survey to a higher value supposed to ensure that the #survey div will appear at the top?
Any help would be greatly appreciated…
Make sure you
#surveyhas a positioning onrelative,absoluteorfixed. W3 spec