473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

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
3 46339
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: lawrence | last post by:
Sorry for the dumb question but I'm new to Javascript. I wrote this script hoping to animate some div blocks on a page. You can see the page here: http://www.keymedia.biz/demo.htm Can anyone...
12
by: lawrence | last post by:
The following function correctly makes everything invisible but then fails to turn the one chosen DIV back to visible. I imagine I'm getting the syntax of the variable wrong? I've tried this with...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
4
by: Ghyslaine Crespe | last post by:
Hello, In my script, the line document.getElementById(id).style.background-position = "-200px -500px"; fails ! So, how can I change the background-position value ?
6
by: Michi | last post by:
Hallo, of course, this doesn't work: document.getElementById('ID').style.-moz-user-select = 'text'; - but i hope it shows my problem... Is it possible to set this css option by javascript and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.