Horizontal:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Style>
# Nav {height: 26px; border-bottom: 2px solid # 2788da; list-style: none ;}
# Nav li {float: left ;}
# Nav li a {color: #000000; text-decoration: none; padding-top: 4px; display: block; width: 120px; height: 22px; text-align: center; background-color: # ececec; margin-left: 2px ;}
# Nav li a: hover {background-color: # bbbbbb; color: # ffffff ;}
# Nav li a # current {background-color: # 2788da; color: # fff ;}
</Style>
</Head>
<Body>
<Ul id = "nav">
<Li> <a id = "current" href = "/index. asp"> homepage </a> </li>
<Li> <a href = "/Sort/List_4.html"> DIV + CSS tutorial </a> </li>
<Li> <a href = "/Sort/List_5.html"> Common Code </a> </li>
<Li> <a href = "/Sort/List_6.html"> crystal icon </a> </li>
<Li> <a href = "/Sort/List_7.html"> slides </a> </li>
<Li> <a href = "/Sort/List_10.html"> Software Download </a> </li>
<Li> <a href = "/css2/"> CSS2.0 practical manual </a> </li>
</Ul>
</Body>
</Html>
Vertical: <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> vertical navigation menu </title>
<Style>
# Nav {width: 100px; border-color: # c5c6c4; border-style: solid; border-width: 0px 1px 1px ;}
# Nav h1 {margin: 0px; padding: 4px; font-size: 12px; font-weight: bold; font-family: Verdana; border-top: 1px solid # c5c6c4; background-color: # CCCCCC ;}
# Nav h2 {margin: 0px; padding: 4px; font-size: 12px; font-family: Verdana; font-weight: normal ;}
# Nav h2 a {color: #666666; text-decoration: none ;}
# Nav h2 a: hover {color: #999999; text-decoration: underline ;}
</Style>
</Head>
<Body>
<Div id = "nav">
<H1> CSS <H2> <a href = "#"> css entry </a> <H2> <a href = "#"> css advanced </a> <H2> <a href = "#"> css advanced </a> <H1> webUI <H2> <a href = "#"> theoretical knowledge </a> <H2> <a href = "#"> practical applications </a> <H2> <a href = "#"> Advanced Skills </a> <H1> DOM <H2> <a href = "#"> DOM entry </a> <H2> <a href = "#"> DOM application </a> <H2> <a href = "#"> DOM and browser </a> <H1> XHTML <H2> <a href = "#"> reference manual </a> <H2> <a href = "#"> Forum </a> </Div>
</Body>
</Html>
Drop-down list:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> drop-down list and multi-level pop-up menu www.aa25.cn </title>
<Script type = "text/javascript"> <! -- // --> <! [CDATA [//> <! --
StartList = function (){
If (document. all & document. getElementById ){
NavRoot = document. getElementById ("nav ");
For (I = 0; I <navRoot. childNodes. length; I ++ ){
Node = navRoot. childNodes [I];
If (node. nodeName = "LI "){
Node. onmouseover = function (){
This. className + = "over ";
}
Node. onmouseout = function (){
This. className = this. className. replace ("over ","");
}
}
}
}
}
Window. onload = startList;
// --> <!]> </Script>
<Style>
Ul {padding: 0; margin: 0; list-style: none ;}
Li {float: left; width: 100px ;}
Ul li a {display: block; font-size: 12px; border: 1px solid # ccc; margin-top: 2px; margin-left: 3px; padding: 3px; text-decoration: none; color: #777 ;}
Ul li a: hover {background-color: # ddd ;}
Li ul {display: none; top: 20px ;}
Li: hover ul, li. over ul {display: block ;}
</Style>
</Head>
<Body>
<Ul id = "nav">
<Li> <a href = ""> Article </a>
<Ul>
<Li> <a href = ""> CSS tutorial </a> </li>
<Li> <a href = ""> DOM tutorial </a> </li>
<Li> <a href = ""> XML tutorial </a> </li>
<Li> <a href = ""> FLASH tutorial </a> </li>
</Ul>
</Li>
<Li> <a href = ""> reference </a>
<Ul>
<Li> <a href = ""> XHTML </a> </li>
<Li> <a href = ""> XML </a> </li>
<Li> <a href = ""> CSS </a> </li>
</Ul>
</Li>
<Li> <a href = ""> BLOG </a>
<Ul>
<Li> <a href = ""> all </a> </li>
<Li> <a href = ""> webpage technology </a> </li>
<Li> <a href = ""> UI technology </a> </li>
<Li> <a href = ""> FLASH technology </a> </li>
</Ul>
</Li>
</Ul>
<Ul>
<Li> <a href = ""> Rock </a> </li>
<Li> <a href = ""> pure music </a> </li>
<Li> <a href = ""> classical jinqu </a> </li>
<Li> <a href = ""> original movie sound </a> </li>
</Ul>
</Body>
</Html>