Nested UL for vertical menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Nested UL for vertical menu

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

#menu li a{
   border-bottom-width:2px;
   border-bottom-style:solid;
   border-bottom-color:red;
   text-decoration:none;<!--from   w ww.  j  av a  2  s . c  o  m-->
}
#menu .children a{
   border-bottom-color:blue;
   background:lightgray;
}


      </style> 
 </head> 
 <body> 
  <ul id="menu"> 
   <li> <a href="#">Link</a> </li> 
   <li> <a href="#">Link</a> </li> 
   <li class="menuActive"> <a href="#">Link</a> 
    <ul class="children"> 
     <li> <a href="#">subLink</a> </li> 
     <li> <a href="#">subLink</a> </li> 
     <li> <a href="#">subLink</a> </li> 
    </ul> </li> 
  </ul>  
 </body>
</html>

Related Tutorials