How can I set a css property to tags with specific attribute?

Tags: jquery,css,google-chrome,google-chrome-extension

Problem :

I want to change font of using extension like stylebot but I only want change fonts in tag with attribue: dir="rtl" like this:

<div dir="rtl">سلام به همگی</div>

It only changes font of rtl languages text, I Know it is possible by jquery but I don't how can I do this with css or any extension the run jquery on other webpages.

Thanks for your help

Solution :

Use the Attribute Selector for CSS

div[dir="rtl"] {
  font-family: "Your Font";

    CSS Howto..

    Chrome & Firefox not rendering bold font-weights of Avenir, but Safari does! How to fix?

    How to create HTML5 popup with minimize etc

    How to get an li to expand to fit thumbnail content?

    How can I apply a custom material design theme to a Bootstrap component

    How to apply CSS to buttons?

    CSS IE7 How can I force UL inside LI to be wider than the parent

    Implementing a select element in my form, but unsure how to grab user selection for a list

    How do browsers handle unrecognized at-rules?

    How can I style this php with divs?

    how to make divs adjust to dynamic screen resolutions?

    How can I see “:hover” and “:active” properties of elements on a webpage? [duplicate]

    how to add css padding for button such that it is consistent with column width?

    HTML/CSS Making a textbox with text that is grayed out, and disappears when I click to enter info, how?

    jQuery - How to adjust CSS filter (blur)?

    How to cast a box shadow only on certain elements

    How to target a child element of a multiple parent selector in SASS [duplicate]

    How to efficiently update css on multiple selector classes in jquery

    How to insert background image on HTML Tag using css?

    How to align HTML horizontaly using CSS

    How to hide content that is not wrapped by tag using only CSS?

    How do I isolate floated content?

    How to reference JSF image resource as CSS background image url

    How to force text to wrap inside inline-block div?

    Javascript/CSS, How to keep changes?

    How to hide p1 within div

    margin-top set by jQuery makes content jump. How can I make it smoothly animate?

    Check this web optimization report - how can I fix it?

    How do you refer to more than one .css file in html?

    How to replace a Font Awesome icon within link text with a different icon on link click?

    Css Sub menu needed to show on the left not on the right of the menu