Expand single column nested ul - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Column

Description

Expand single column nested ul

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">
div {<!--from   w  ww .  j a  va  2  s. c  om-->
   width:181px;
}

div ul ul {
   display:none;
}

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

div ul li {
   list-style:none;
   background:Chartreuse;
   width:181px;
}

div ul ul li {
   background:blue;
   width:181px;
}

div ul ul li a {
   width:181px;
   color:yellow;
}

div ul ul ul li {
   background:red;
   width:181px;
}

.sub
 {
   padding:0px;
}
</style> 
 </head> 
 <body> 
  <div> 
   <ul> 
    <li> <a href="#">Lore</a> </li> 
    <li> <a href="#">Lorem ips</a> 
     <ul class="sub"> 
      <li> <a href="#">Lorem ips</a> </li> 
      <li> <a href="#">Lorem ipsum</a> </li> 
      <li> <a href="#">Lorem ipsu</a> 
       <ul class="sub"> 
        <li> <a href="#">Lore</a> </li> 
        <li> <a href="#">Lor</a> </li> 
       </ul> </li> 
     </ul> </li> 
    <li> <a href="#">Lorem ip</a> 
     <ul class="sub"> 
      <li> <a href="#">Lorem ipsu</a> </li> 
      <li> <a href="#">Lorem ipsum dol</a> </li> 
     </ul> </li> 
    <li> <a href="#">Lorem ipsum</a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials