Centering the dropdown menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

Centering the 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 {<!--  w ww  .j  av a  2s  .  c om-->
   list-style:none;
}

li {
   display:block;
   float:left;
   height:21px;
   background:Chartreuse;
   margin:11px;
   position:relative;
}

li span {
   height:100px;
   width:100px;
   background:yellow;
   display:none;
   margin:0 auto ;
}

li:hover span {
   display:block;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li>Lorem ipsum dolo<span></span> </li> 
   <li>Lorem ipsum dolor sit amet, con<span></span> </li> 
   <li>Lorem ipsum dolo<span></span> </li> 
   <li>Lorem ipsum dolor sit amet, consectetur adip<span></span> </li> 
  </ul>  
 </body>
</html>

Related Tutorials