Multi conditional attribute selector - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

Multi conditional attribute selector

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
a[href$=".pdf"]:not([href*="special-edition"]) {
   background-color:Chartreuse;
}

.container-node {<!--   w  w  w .ja va2  s  .  c  o m-->
   background-color:yellow;
}
</style> 
 </head> 
 <body> 
  <div class="container-node"> 
   <a href="1.pdf">Lorem i</a> 
   <a href="2.pdf">Lorem i</a> 
   <a href="3.pdf">Lorem i</a> 
   <a href="special-edition1.pdf">Lorem ipsum dolor</a> 
   <a href="4.pdf">Lorem i</a> 
   <a href="special-edition2.pdf">Lorem ipsum dolor</a> 
  </div>  
 </body>
</html>

Related Tutorials