CSS Selectors to select child - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:element parent child

Description

CSS Selectors to select child

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">
.partialViewContainer>fieldset>div:first-child {
   border:2px solid Chartreuse;
}
</style> <!--  w  w w .j av a  2 s. c  o  m-->
 </head> 
 <body> 
  <div class="partialViewContainer"> 
   <fieldset> 
    <div>
      Lorem ipsum do 
    </div> 
    <div>
      Lorem ipsum do 
    </div> 
   </fieldset> 
  </div>  
 </body>
</html>

Related Tutorials