create a dropdown menu in the nav bar - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

create a dropdown menu in the nav bar

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
ul {<!--from   w  w  w.  j a  va2 s  .  c  o m-->
   padding:0;
   margin:0;
   list-style:none;
}

ul li {
   padding:11px 26px;
   float:left;
   background-color:Chartreuse;
   color:yellow;
   cursor:pointer;
}

ul li ul {
   display:none;
}

ul li:hover ul {
   display:block;
}
</style> 
 </head> 
 <body translate="no"> 
  <ul> 
   <li>Lorem ip 
    <ul> 
     <li>Lorem ip</li> 
    </ul> </li> 
   <li>Lorem ip 
    <ul> 
     <li>Lorem ip</li> 
     <li>Lorem ipsu 
      <ul> 
       <li>Lor</li> 
      </ul> </li> 
    </ul> </li> 
  </ul>  
 </body>
</html>

Related Tutorials