CSS select and style for RTL specific style - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:attribute equals value

Description

CSS select and style for RTL specific style

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
.app {<!--from   ww  w . jav a2  s .c o m-->
   width:301px;
   height:100px;
   border:2px solid Chartreuse;
}

[dir="rtl"].app h1 {
   color:yellow;
}

[dir="ltr"].app h1 {
   color:blue;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="container"> 
   <div class="app" dir="rtl"> 
    <h1> TITLE </h1> 
   </div> 
   <div class="app" dir="ltr"> 
    <h1> TITLE </h1> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials