Make <li> as whole <a> (link) vertical menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Make <li> as whole <a> (link) 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">
#nav {<!--from  ww w  . j a v a 2  s . com-->
   position:relative;
   width:121px;
}

#nav a {
   display:block;
   text-decoration:none;
   float:left;
}

#nav ul {
   list-style-type:none;
}

#nav ul li {
   background:Chartreuse;
   border-bottom:2px dotted yellow;
   overflow:hidden;
}

#nav ul ul {
   position:absolute;
   left:82px;
   display:none;
}

#nav ul ul li {
   background:blue;
}

#nav ul li:hover ul {
   display:inline;
}
</style> 
 </head> 
 <body> 
  <div id="nav"> 
   <ul> 
    <li> <a href="#">Lorem i</a> 
     <ul> 
      <li> <a href="#">Lorem ip</a> </li> 
      <li> <a href="#">Lorem ip</a> </li> 
     </ul> </li> 
    <li> <a href="#">Lorem i</a> 
     <ul> 
      <li> <a href="#">Lorem ip</a> </li> 
      <li> <a href="#">Lorem ip</a> </li> 
     </ul> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials