CSS Menu hide UL, expand when hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Hover

Description

CSS Menu hide UL, expand when hover

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 a {<!--   w  ww .jav a  2s.  c  o  m-->
   text-decoration:none;
   color:Chartreuse;
   font-family:'Roboto', sans-serif;
}

nav ul {
   list-style-type:none;
}

nav a {
   color:yellow;
}

nav ul li>ul {
   display:none;
}

nav ul li:hover>ul {
   display:block;
}
</style> 
 </head> 
 <body> 
  <nav> 
   <ul> 
    <li> <a href="index.html">Lore</a> </li> 
    <li> <a href="about.html">Lorem</a> </li> 
    <li> <a href="gear.html">Lore</a> 
     <ul> 
      <li> <a href="p1.html">Lo</a> </li> 
      <li> <a href="p2.html">Lo</a> </li> 
      <li> <a href="p3.html">Lo</a> </li> 
      <li> <a href="p4.html">Lo</a> </li> 
      <li> <a href="p5.html">Lo</a> </li> 
     </ul> </li> 
    <li> <a href="news.html">Lore</a> </li> 
    <li> <a href="contact.html">Lorem i</a> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials