Stacking menu items under each other and a slider under it - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Item

Description

Stacking menu items under each other and a slider under it

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 {<!--from www  . j a  v  a 2s.c  om-->
   height:49px;
   font-size:16px;
   font-family:"myriad pro";
   color:Chartreuse;
   background-color:yellow;
   border:2px solid blue;
}

#menu ul {
   margin:0px;
   margin-left:-41px;
   display:block;
}

#menu li {
   display:inline-block;
}

#menu li:hover {
   background-color:pink;
}

#menu a {
   color:OrangeRed;
   text-decoration:none;
   padding:15px;
   display:inline-block;
}

#menu a:hover {
   color:grey;
}

#menu a i {
   font-size:10px;
}

#menu a i.icon {
   font-size:18px;
}

#menu ul ul {
   display:none;
   position:absolute;
   z-index:1000;
}

#menu ul ul li {
   display:block;
   background-color:BlueViolet;
}

#nav li:hover ul {
   display:block;
}
</style> 
 </head> 
 <body> 
  <nav id="menu"> 
   <ul id="nav"> 
    <li> <a href="#"> <i class="fa fa-home icon"></i> </a> </li> 
    <li> <a href="#">Lorem i<i class="fa fa-chevron-down"></i> </a> 
     <ul class="level-1"> 
      <li> <a href="#">Lorem ips</a> </li> 
      <li> <a href="#">Lorem ips</a> </li> 
     </ul> </li> 
    <li> <a href="#">Lorem ipsum <i class="fa fa-chevron-down"></i> </a> </li> 
    <li> <a href="#">Lorem ipsum do<i class="fa fa-chevron-down"></i> </a> </li> 
    <li> <a href="#">Lorem ipsum do<i class="fa fa-chevron-down"></i> </a> </li> 
    <li> <a href="#">Lorem ipsum d<i class="fa fa-chevron-down"></i> </a> </li> 
    <li> <a href="#">Lorem ip<i class="fa fa-chevron-down"></i> </a> </li> 
    <li> <a href="#">Lorem ips<i class="fa fa-chevron-down"></i> </a> </li> 
    <li> <a href="#"> <i class="fa fa-search icon"></i> </a> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials