tags:

views:

40

answers:

1

Greetings,

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...

A: 

Make sure you #survey has a positioning on relative, absolute or fixed. W3 spec

Dustin Laine
that didn't work for me. although I only tried relative
coson
stop the press!!! I just tried absolute, and it appeared to work. I thought I understood the difference between relative/absolute but I was obviously wrong.
coson