Jump to content

finding out what z-index are used


ricmetal

Recommended Posts

You normally use a z-index of 0, unless you manually specify anything else. Which means that they'll stack based upon their order in the DOM, with the first element being at the bottom. So I'm not quite sure why you'd want to find out what's already in use.

Normally you'd just set the z-index of the container to a positive value, and then set the z-indices of the children elements to the values needed to achieve the desired stacking order.

Link to comment
Share on other sites

like i've told you before, if you've set it manually, it'll be visible through something like firebug.

 

However, displaying something over a modal defeats the purpose of the modal.  Also, if you set the modal parent's z-index, every one of it's children becomes +1 to the value you've set.

 

But if for some reason you'd like a toolbar (or other random element) to be over the modal, then be sure to set it's value higher than the modal.  You're writing the CSS, so you should know it's value anyway.  And if you get lost, just give it a look up.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.