18 Oct, 2009

Vertikaal uitgeklapt menu

Categoriën: links | menu | template

Een simpel navigatie menu door gebruik van in elkaar geneste lijsten om zo een uitgeklapt menu te realiseren.

HTML

<div id="navcontainer">
<ul id="navlist">
<li id="active"><a href="#" id="current">Item one</a>
<ul id="subnavlist">
<li id="subactive"><a href="#" id="subcurrent">Subitem one</a></li>
<li><a href="#">Subitem two</a></li>
<li><a href="#">Subitem three</a></li>
<li><a href="#">Subitem four</a></li>
</ul>
</li>
<li><a href="#">Item two</a></li>
<li><a href="#">Item three</a></li>
<li><a href="#">Item four</a></li>
</ul>
</div>

CSS

#navlist {
list-style-type: none;
color: #333;
background-color: #eee;
margin-left: 5px;
}
#active:hover li {
display: block;
}
#active li {
display: none;
}
#navcontainer {
width: 220px;
background-color: #eee;
border: 1px #999 solid;
}
#navcontainer a {
color: #999;
background-color: #eee;
width: 120px;
display: block;
}
#navcontainer a:visited {
color: #900;
background-color: #eee;
}
#navcontainer a:active {
color: #fff;
background-color: #000;
}
#navcontainer a:hover {
color: #fff;
background-color: #000;
}

Gerelateerde Snippets

1 Reaktie op "Vertikaal uitgeklapt menu"

Erik

October 19th, 2009 at 01:12

1

Netjes, juist wat ik zocht. Merci

Reaktie formulier


Advertenties

Volgende nieuwe Snippet:

  • Momenteel niks gepland.