Breeze
09-26-2004, 02:51 PM
I'm making a very simple menu for at chat, where you are supposed to click on a nickname, and a popup should hoover over it. The problem is however how the nicknames below are covering the popup box, even with z-index set.
I've figured that it is the NESTED div (menu) tag inside the NameTag div, that is causing this. If i move the menu div out one level so it is in line with all NameTag divs, it show up.
This causes a problem, beside the point that it seems much more troublesome to handle, which is mouseover gets activated immidiately and the menu starts to flicker in and out.
I hope someone have a sollution for this problem, have been bugging me all weekend :confused:
Here is the simple html code:
<div class="NameTag" onMouseOver="showmenu(this)" onMouseOut="hidemenu(this)" >Breeze
<div class="menu" onMouseOut="hidemenu(this)">
<a href="#">Profil</a><br/>
<a href="#">Site</a>
</div>
</div>
<div class="NameTag" onMouseOver="showmenu(this)" onMouseOut="hidemenu(this)" >Test
<div class="menu" id="1" onMouseOut="hidemenu(this)">
<a href="#">Profil</a><br/>
<a href="#">Site</a>
</div>
</div>
CSS:
div.NameTag
{
width:99%;
height:20px;
background-color:Silver;
border: 1px solid black;
text-indent: 5px;
position: relative;
z-index: 1;
}
div.menu
{
left: 10px;
top: 5px;
width:150px;
height:100px;
border: 1px solid black;
display: none;
background-color: gray;
padding: 1px;
position: absolute;
z-index: 100;
}
I've figured that it is the NESTED div (menu) tag inside the NameTag div, that is causing this. If i move the menu div out one level so it is in line with all NameTag divs, it show up.
This causes a problem, beside the point that it seems much more troublesome to handle, which is mouseover gets activated immidiately and the menu starts to flicker in and out.
I hope someone have a sollution for this problem, have been bugging me all weekend :confused:
Here is the simple html code:
<div class="NameTag" onMouseOver="showmenu(this)" onMouseOut="hidemenu(this)" >Breeze
<div class="menu" onMouseOut="hidemenu(this)">
<a href="#">Profil</a><br/>
<a href="#">Site</a>
</div>
</div>
<div class="NameTag" onMouseOver="showmenu(this)" onMouseOut="hidemenu(this)" >Test
<div class="menu" id="1" onMouseOut="hidemenu(this)">
<a href="#">Profil</a><br/>
<a href="#">Site</a>
</div>
</div>
CSS:
div.NameTag
{
width:99%;
height:20px;
background-color:Silver;
border: 1px solid black;
text-indent: 5px;
position: relative;
z-index: 1;
}
div.menu
{
left: 10px;
top: 5px;
width:150px;
height:100px;
border: 1px solid black;
display: none;
background-color: gray;
padding: 1px;
position: absolute;
z-index: 100;
}