Pop-open list

Author: Bill Creswell

Browser support chart

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: darkgray;
background-color: gainsboro;
margin-left: 5px;
}

#active:hover li { display: block; }
#active li { display: none; }

#navcontainer
{
width: 220px;
background-color: gainsboro;
border: 1px gray solid;
}

#navcontainer a
{
color: gray;
background-color: gainsboro;
width: 120px;
display: block;
}

#navcontainer a:visited
{
color: gray;
background-color: gainsboro;
}

#navcontainer a:active
{
color: white;
background-color: gray;
}

#navcontainer a:hover
{
color: white;
background-color: gray;
}


ABOUT THE CODE
Some lists within the Listamatic site had to be modified so that they could work on Listamatic's simple list model. When in doubt, use the external resource first, or at least compare both models to see which one suits your needs.