Margin for nested UL list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Margin for nested UL list

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">
#content-sidebar li {
   margin-bottom:11px;
}

.content-sidebar-box {<!-- www . j ava2  s.  co  m-->
   background:blue
}

.content-sidebar-submenu {
   background:red;
}

#content-sidebar .content-sidebar-submenu li {
   margin-bottom:0;
}
</style> 
 </head> 
 <body> 
  <div id="content-sidebar"> 
   <ul> 
    <li class="content-sidebar-box"> <a>Lore</a> 
     <div class="content-sidebar-submenu"> 
      <ul> 
       <li> <a>Lorem ips</a> </li> 
       <li> <a>Lorem ips</a> </li> 
       <li> <a>Lorem ips</a> </li> 
      </ul> 
     </div> </li> 
    <li class="content-sidebar-box"> <a>Lore</a> 
     <div class="content-sidebar-submenu"> 
      <ul> 
       <li> <a>Lorem ips</a> </li> 
       <li> <a>Lorem ips</a> </li> 
       <li> <a>Lorem ips</a> </li> 
      </ul> 
     </div> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials