CSS only Menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

CSS only 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, li {
   maring:0;<!--from   ww  w . j a  v  a 2 s  . c o m-->
   padding:0;
}

ul {
   list-style:none;
}

.submenu {
   display:none;
}

.menu-item {
   width:100px;
   display:inline-block;
   position:relative;
}

.menu-item:hover .submenu {
   display:block;
   position:absolute;
}
</style> 
 </head> 
 <body> 
  <ul class="main-menu"> 
   <li class="menu-item"> <a href="#">Lorem</a> 
    <ul class="submenu"> 
     <li class="submen-item"> <a href="#">Lorem i</a> </li> 
    </ul> </li> 
   <li class="menu-item"> <a href="#">Lorem</a> 
    <ul class="submenu"> 
     <li class="submen-item"> <a href="#">Lorem i</a> </li> 
    </ul> </li> 
   <li class="menu-item"> <a href="#">Lorem</a> 
    <ul class="submenu"> 
     <li class="submen-item"> <a href="#">Lorem i</a> </li> 
     <li class="submen-item"> <a href="#">Lorem i</a> </li> 
     <li class="submen-item"> <a href="#">Lorem i</a> </li> 
    </ul> </li> 
  </ul>  
 </body>
</html>

Related Tutorials