By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,963 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,963 IT Pros & Developers. It's quick & easy.

document.getElementById(name).style.z-index

P: n/a
How do I change the z-index on a page I have tried

document.getElementById(name).style.z-index
and
document.getElementById(name).style.Zindex

I want to change the z-index to show a layer that is covered
--

Totus possum, totum Deum.
Totus ero, totum meum.
WSW
Oct 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Aquosus wrote on 06 okt 2006 in comp.lang.javascript:
How do I change the z-index on a page I have tried

document.getElementById(name).style.z-index
No
document.getElementById(name).style.Zindex
No, the - is always replaced
by a uppercasing the letter that follows:

style.zIndex

instead of the name use the id

document.getElementById('myId').style.zIndex = -5
I want to change the z-index to show a layer that is covered
Forget about layers, speak <div>s

Read the specs:

<http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/properties/zindex.asp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 6 '06 #2

P: n/a
Not only that, you also want to make sure you understand the rules for
z-indexing... for example...

<div id="d11">
<div id="d121"></div>
<div id="d122"></div>
<div id="d123"></div>
<div id="d124"></div>
</div>
<div id="d12">
<div id="d221"></div>
<div id="d222"></div>
<div id="d223"></div>
<div id="d224"></div>
</div>

You can play with the zIndexes of the d2** blocks with each other but
you aren't going to have d224 on top on d11. z-indexing is for
sibblings only.

Evertjan. wrote:
Aquosus wrote on 06 okt 2006 in comp.lang.javascript:
How do I change the z-index on a page I have tried

document.getElementById(name).style.z-index

No
document.getElementById(name).style.Zindex

No, the - is always replaced
by a uppercasing the letter that follows:

style.zIndex

instead of the name use the id

document.getElementById('myId').style.zIndex = -5
I want to change the z-index to show a layer that is covered

Forget about layers, speak <div>s

Read the specs:

<http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/properties/zindex.asp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 7 '06 #3

P: n/a
wrote on 07 okt 2006 in comp.lang.javascript:
Not only that, you also want to make sure you understand the rules for
z-indexing... for example...
True,
you might want to look into the merits of not topposting too,
especially in a non topposting thread.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.