Select link of certain class within body of certain class - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:class

Description

Select link of certain class within body of certain class

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
.outer<!--from  w w w  . j  a  v  a 2s .  com-->
 {
   background-color:Chartreuse;
   height:41px;
   margin:11px;
}

.inner
 {
   background-color:yellow;
   height:21px;
   margin:6px;
}

.outer .inner
 {
   background-color:blue;
}
</style> 
 </head> 
 <body onload="loadCars()">
   Lorem ipsum dolor 
  <div id="mydiv" class="inner"> 
  </div> 
  <div id="mydiv" class="outer"> 
   <div id="mydiv" class="inner"></div> 
  </div>  
 </body>
</html>

Related Tutorials