Vertical menu with vertical submenu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu sub menu

Description

Vertical menu with vertical submenu

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">
ul {<!--from  ww w. j ava  2 s  .c  o m-->
   list-style-type:none;
   margin:0;
   padding:0;
}

ul ul {
   position:absolute;
   top:-2px;
   left:151px;
   display:none;
}

ul li {
   position:relative;
   list-style-type:none;
   margin:0;
   padding:0;
   color:Chartreuse;
   border:2px solid yellow;
   width:151px;
   text-align:center;
   cursor:pointer;
   height:21px;
}

ul li + li {
   margin-top:-2px;
}

ul li:hover {
   background:blue;
}

ul li:hover ul {
   display:block;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li>Lorem i</li> 
   <li>Lorem ips 
    <ul> 
     <li>Lorem ips</li> 
     <li>Lorem ips</li> 
     <li>Lorem ips</li> 
     <li>Lorem ips</li> 
     <li>Lorem ips</li> 
    </ul> </li> 
   <li>Lorem i</li> 
   <li>Lorem i</li> 
   <li>Lorem i</li> 
  </ul>  
 </body>
</html>

Related Tutorials