CSS 3 selector for parent tag - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:element parent child

Description

CSS 3 selector for parent tag

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">
a:hover {<!--from www  . jav  a 2 s  .  c om-->
   background-color:Chartreuse;
}

span:hover {
   border:NONE !IMPORTANT;
}
</style> 
 </head> 
 <body> 
  <div style="width:200px; height:200px;border:solid 1px; padding:10px;"> 
   <span style="width:180px; height:180px;border:double 1px red;"> <a href="#">Lorem ipsum dolor</a> </span> 
  </div>  
 </body>
</html>

Related Tutorials