Dropdown Menu padding - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

Dropdown Menu padding

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">
nav {<!--from  w w w.  j  a  v a 2  s  .  c  om-->
   position:relative;
   text-align:center;
   margin:0px auto;
   top:0;
   left:0;
   right:0;
   bottom:0;
   width:100%;
   z-index:2;
}

nav ul {
   list-style:none;
   position:relative;
   display:inline-table;
   margin:0px auto;
}

nav ul li {
   float:left;
   transition:all 0.3s ease-in-out;
}

nav ul li:hover {
   background:Chartreuse;
}

nav ul li:hover>ul {
   display:block;
}

nav ul li {
   transition:all 0.3s ease-in-out;
}

nav ul li a {
   display:block;
   padding:31px 21px;
   color:yellow;
   font-size:0.10em;
   letter-spacing:2px;
   text-decoration:none;
   text-transform:uppercase;
}

nav ul ul {
   display:none;
   background:blue;
   position:absolute;
   top:100%;
   box-shadow:-4px 4px 11px -3px pink;
   border:OrangeRed solid 2px;
}

nav ul ul li {
   float:none;
   position:relative;
}

nav ul ul li a {
   padding:16px 31px;
   border-bottom:2px solid grey;
}

nav ul ul ul {
   position:absolute;
   left:100%;
   top:0;
}

#active {
   background:BlueViolet
}

nav ul ul {
   padding:0;
}
</style> 
 </head> 
 <body> 
  <nav role="navigation"> 
   <ul> 
    <li id="active"> <a href="">Lorem</a> </li> 
    <li> <a href="">Lorem</a> 
     <ul> 
      <li> <a href="">Lorem ip</a> </li> 
      <li> <a href="">Lorem ip</a> </li> 
      <li> <a href="">Lorem ip</a> </li> 
     </ul> </li> 
    <li> <a href="">Lorem</a> 
     <ul> 
      <li> <a href="">Lorem ip</a> </li> 
      <li> <a href="">Lorem ip</a> </li> 
      <li> <a href="">Lorem ip</a> </li> 
     </ul> </li> 
    <li> <a href="">Lorem</a> </li> 
    <li> <a href="">Lorem</a> </li> 
    <li> <a href="">Lorem</a> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials