Link to home
Start Free TrialLog in
Avatar of savsoft
savsoftFlag for India

asked on

overwriting of <div>

i have two <div> tags on same position . how to assign z-index to them so that when i click on one div tag so that one become enable and become disabled......


Thanx in advance
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of savsoft

ASKER

can we use z-index for <td> tag also.....???? because one div is overlaying another <td>
Yes, it can be used for any element as long as you have positioned that element.
http://www.w3schools.com/cssref/pr_pos_z-index.asp

you need to give position:relative for that td
Avatar of savsoft

ASKER

One more thing gurvinder....is there any way that if one div is there of index 2 and one of index 3....when idiv with index 2 is hidden then index of div 3 get enabled automatically
i guess, even if the div with z-index 2 is not hidden, div with z-index 3 will always be enabled regardless, since it will be on top of div with index 2.
Higher index takes more priority and it overlays whatever is beneath with lower z-index
Avatar of savsoft

ASKER

and if index 3 div is hidden.....will the div with index 2 will be enabled automatically
Avatar of savsoft

ASKER

shukriya.....:P:P
Glad to help. Please respond to your other open questions as well
Avatar of savsoft

ASKER

i want to hide second div whose z-index:2 and enable to first div whose z-index:1  by calling function

function hidestuff(id,toph,main)
{
document.getElementById(main).style.border="none";
document.getElementById(id).style.display="none";
}

it hide second div but doesn't enable first div


Avatar of savsoft

ASKER

thanks in advance
please explain the parameters of this method
which one is div with index 1 and which one is div with index 2
Avatar of savsoft

ASKER

i have two div

one with index 1 and one with index 2........ when i click on one link then i want ke zindex get replaced that is the procedure i want...... so plz explain me with short example
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of savsoft

ASKER

i am not able to solve problem its just like facebook chat ....when chat window get opens then area behind that window become absolute
is it possible for you to share live internet link
Avatar of savsoft

ASKER

www.labbo22.com

username is : contacts@savsoft.co.in
password is sasasa...come there i ll tell you what i want
how should i login? i don't see the link to login
i am able to login, but it says unable to post
Avatar of savsoft

ASKER

ya plz login there again.....actually i have unblocked you... because we were testing so come back..thr?