Navigation dropdown menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

Navigation dropdown 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">
ul {<!--   www  .  j  a v  a  2s  .c o  m-->
   padding:0;
   margin:0;
   display:table;
   width:100%;
}

li {
   list-style:none;
   display:block;
   float:left;
   position:relative;
   max-width:161px;
   min-width:121px;
   border:2px solid Chartreuse;
   cursor:pointer;
   text-align:center;
}

a {
   background:beige;
   display:inline-block;
   width:100%;
}

.dropdown {
   display:none;
   position:absolute;
   top:19px;
   left:0;
   z-index:2;
}

.dropdown li {
   cursor:pointer;
   display:block;
}

li:hover>.dropdown {
   display:block;
}

.dropdown li:hover a {
   background:whiteSmoke;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li> <a>Lorem</a> </li> 
   <li> <a>Lorem</a> </li> 
   <li> <a>Lorem ipsum</a> 
    <ul class="dropdown"> 
     <li> <a>Lorem ipsu</a> </li> 
     <li> <a>Lorem ipsum</a> </li> 
     <li> <a>Lorem ipsu</a> </li> 
    </ul> </li> 
   <li> <a>Lorem ipsum dolor</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials