Forum Moderators: not2easy
Can I have a layer increase it's z-index when I hover with the mouse over it?
I'm trying to do this dropdown menu of my own and I want to do it this way for now.
html:
<div id="MenuHome" align="center"><a>Home</a>
css:
#MenuHome{
position:absolute;
width:130px;
height:100px;
background-color:#663;
z-index:2;
left:0px;
top:0px;
visibility:visible;
}
#MenuHome A:hover{
z-index:5;
}
Am I doing this the wrong way? So far it doesn't work.
I'm pretty much a rookie in both html and css.
Thanks for any help!
<a onmouseover="javascript:this.style.zIndex = 5;">Home</a>
or if that doesn't work 'cause it doesn't acknowledge the "this", try:
<a id="aHome" onmouseover="javascript:document.getElementById("aHome").style.zIndex = 5;">Home</a> I'm sure we could mess around with CSS all day and figure it out, but at least you have a temp solution now.