CSS direct descendent selectors - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

CSS direct descendent selectors

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">
ul li {
   list-style:none;
   margin:0;
}

ul.locations>li>ul.children>li {
   margin-left:16px;
   clear:both;
}

ul.locations>li>ul.children>li>ul.children>li {
   float:left;
}
</style> <!--from  www.j  av a2s .c  om-->
 </head> 
 <body> 
  <ul class="locations"> 
   <li>Lorem ips 
    <ul class="children"> 
     <li>Lorem ipsum dol 
      <ul class="children"> 
       <li>Lorem ips</li> 
       <li>Lorem ipsum</li> 
      </ul> </li> 
    </ul> </li> 
  </ul>  
 </body>
</html>

Related Tutorials