CSS adjacent selector usage - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

CSS adjacent selector usage

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">
#banner-message button + p {
   color:Chartreuse;
}
</style> <!--from  www  .  j  a va 2s. c om-->
 </head> 
 <body> 
  <div id="banner-message"> 
   <p>Lorem ipsum</p> 
   <button>Lorem ipsum dolor sit</button> 
   <p>Lorem ipsum</p> 
  </div>  
 </body>
</html>

Related Tutorials