Three level menu alignment and styling - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Three level menu alignment and styling

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>ul {
   display:none;
}

#menu li:hover>ul {
   display:block;
}

nav {<!--from  w  w  w .j  a v a  2 s .  c om-->
   position:relative;
}

#menu>li {
   float:left;
   padding:11px;
   border:2px ridge Chartreuse;
}

#menu a {
   text-decoration:none;
   font-size:21px;
   color:yellow;
   padding:11px;
}

.submenu {
   background-color:blue;
   margin-left:26px;
}
</style> 
 </head> 
 <body> 
  <title>Lorem ipsum dolor sit amet, consec</title> 
  <nav> 
   <ul id="menu"> 
    <li> <a href="#" title="Home">Lore</a> </li> 
    <li> <a href="#" class="normaltip" title="Units">Lorem ipsum dolor </a> 
     <ul class="submenu"> 
      <li> <a href="...">Lorem ips</a> </li> 
      <li> <a href="...">Lorem ipsum d</a> 
       <ul class="submenu"> 
        <li> <a href="...">Lorem ipsum d</a> </li> 
        <li> <a href="...">Lorem ipsum d</a> </li> 
       </ul> </li> 
     </ul> </li> 
    <li> <a href="#" title="Future Residents">Lorem ipsum</a> </li> 
    <li> <a href="#" title="Current Residents">Lorem ipsum dolor </a> 
     <ul class="submenu"> 
      <li> <a href="...">Lorem ips</a> </li> 
      <li> <a href="...">Lorem ipsum d</a> 
       <ul class="submenu"> 
        <li> <a href="...">Lorem ipsum d</a> </li> 
        <li> <a href="...">Lorem ipsum dolor</a> 
         <ul class="submenu"> 
          <li> <a href="...">Lorem ipsum dolor</a> </li> 
          <li> <a href="...">Lorem ipsum dolor</a> </li> 
         </ul> </li> 
       </ul> </li> 
     </ul> </li> 
    <li> <a href="#" title="Contact Us">Lorem ipsum</a> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials