-2

I'm trying to bring up certain elements by their z-index

z-index:100;

But then I need to put them back to where they were, how do I get that value or even just set to it without actually knowing it?

laggingreflex
  • 32,948
  • 35
  • 141
  • 196
  • where are you trying to do this? in javascript? what do you mean by "bring up"? – J Max Nov 27 '12 at 01:44
  • 1
    you will have to use javascript for that. You need to get the computed style. check my answer [here](http://stackoverflow.com/questions/6134471/using-elements-that-are-added-to-an-array-with-document-getelementbyidid/6134501#6134501) – Ibu Nov 27 '12 at 01:44
  • back to auto? z-index: auto; - its the default – OJay Nov 27 '12 at 01:48

1 Answers1

3

If you just need to bring up an element and bring it back down - you can add/remove a class to override the previous z-index - assuming you don't need to know the orignal z-index.

peterdotjs
  • 1,526
  • 1
  • 13
  • 19