GingerChris
Member
How do I make a drop down menu using CSS like on
SmartWaveTech :: Re-inventing the future
All replies are appreciated.
Chris
SmartWaveTech :: Re-inventing the future
All replies are appreciated.
Chris
<div class='menu'>menu label
<ul>
<li>menu item 1</li>
<li>menu item 2 etc</li>
</ul>
</div>
.menu ul { display:none; }
.menu:hover ul { display:block; }
<ul id="tablist">
<li><a class="current" href="index.html" accesskey="m"><span class="key">Home</span></a> </li>
<li><a href="about.html" accesskey="e"><span class="key">A</span>bout Us</a></li>
<li><a href="dedicated.html" accesskey="p"><span class="key">D</span>edicated Servers</a></li>
<li><a href="vps.html" accesskey="c"><span class="key">V</span>irtual Servers</a></li>
<li><a href="support.html" accesskey="r"><span class="key">S</span>upport</a></li>
</ul>
</div>
#tablist{ margin: 25px 0 0 0; }
#tablist li{ list-style: none; display: inline; }
#tablist li a{
text-decoration: none;
margin: 0 3px 0 0;
padding: 4px 15px;
border: 1px solid #3B3B3B;
font-weight: bold;
color: #ccc;
}
#tablist li a:hover{
border: 1px solid #55684A;
color: #fff;
}
#tablist li a.current{
background: #ADD597;
color: #fff;
}
#tablist .key { text-decoration: underline; }
<ul id="tablist">
<li>
<a class="current" href="index.html" accesskey="m"><span class="key">Home</span></a>
<ul>
<li><a href="item1.html">item 1</a></li>
<li><a href="item2.html">item 2</a></li>
</ul>
</li>
<li>etc</li>
</ul>
#tablist li ul { display:none; }
#tablist li:hover ul { display:block; }