Hi all
Am getting frustrated with myself right now.
Am attempting my first simple drop down menu and it almost works.
When you hover on the menu item the drop down appears but when you move the mouse to one of the items on the drop down it vanishes.
I'm sure its just 1 tiny little bit I'm missing or done wrong. Can anyone help please!!??
Iv done some investigation and some people are saying about Javascript and I really don't want to use that for this. Others have said about the z-index but I'm not to sure for what and where!!
Code:
/*navigation bar*/
.nav ul {
margin:2px;
padding:5px;
font-size:20px;
margin-left:auto;
margin-right:auto;
}
.nav li {
position:relative;
list-style-type:none;
float: left;
display:inline;
padding:0 10px 0 10px;
font-size:20px;
font-weight:bold;
}
.nav li ul {
position:absolute;
left:-9999px;
top:-9999px;
list-style-type:none;
}
.nav li:hover {
position:relative;
}
.nav li:hover ul {
left:0px;
top:29px;
z-index:100;
}
.nav li:hover ul li a {
display:block;
width:90px;
height:30px;
border:thin solid #000;
background-color:#F60;
padding-left:8px;
}
/*end navigation bar*/
Code:
<div id="nav_bar">
<ul class="nav">
<li><a href="#">|Home|</a></li>
<li><a href="#">|About|</a>
<ul>
<li><a href="#">Aims</a></li>
<li><a href="#">History</a></li>
<li><a href="#">Team</a></li>
</ul>
</li>
<li><a href="#">|Services|</a></li>
<li><a href="#">|Contact|</a></li>
<li><a href="#">|Blog|</a></li>
</ul>
</div>
Thanks very much
C