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

A

Aquosus

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
 
E

Evertjan.

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

agapeton

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

Evertjan.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top