Wrox Programmer Forums
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 26th, 2004, 02:37 PM
Friend of Wrox
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default change z-index

can we change the z-index property of a <DIV> like:

also assume case of nested <DIV>s
because i can't do it like this.

other question related i've is that, we can do esaily with our script using getElementById() function; but i've seen that all scripters do <LAYER> using 'navs' etc. in their code. why ? this makes functions very complicated. Why they can't totally rely on getElementById() ..
PHP, SEO | anshul shrivastava | mediasworks.org | FB
Old July 27th, 2004, 03:19 AM
Friend of Wrox
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post

Hi Anshul,

You can change the z-index of an element using:

document.getElementById(arg_id).style.zIndex = some_number;
People can't always rely on getElementById() because not all browsers support the same methods.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Index carumuga SQL Server 2000 1 December 31st, 2007 12:42 PM
Dropdownlist index change event problem. thanigaimani83 ASP.NET 1.x and 2.0 Application Design 0 November 7th, 2007 06:40 AM
generate index rshan XSLT 1 May 23rd, 2007 01:14 AM
How to keep url end w/ index.htm when page change bekim HTML Code Clinic 3 January 25th, 2005 05:00 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.