Brendan
Brendan

Reputation: 331

CSS- Right to Left Text Content

So I've marked up a responsive page that the client not wants to be in Arabic. When provided with the copy changes I merely copied and pasted the translated text content into the mark up and added 'dir="rtl"' to my html line.

I've now received feedback from the client stating that the text is it is still reading incorrectly. I've removed the tag thinking that perhaps that was the error but I then got the same response. I have absolutely no idea what's wrong with the mark up.

<html class="no-js" dir="rtl">
<h3>عروض الكهرباء أصبحت أكثر تنافسية 
</h3>

                <p>
                    لقد تغيرت الكهرباء في نيو ساوث ويلز. فرفع القيود الرقابية عن الكهرباء يعني خطط أكثر تنافسية للكهرباء، والمزيد من الخيارات، وانخفاض أسعار الكهرباء في نيو ساوث ويلز؛ الأمر الذي يعود بالنفع على المنازل والشركات الصغيرة.
                </p>

Upvotes: 2

Views: 5793

Answers (2)

Darshak Shekhda
Darshak Shekhda

Reputation: 646

simple apply text-align: right; to p tag OR you can apply direction: rtl; also.

Upvotes: 1

Florin Pop
Florin Pop

Reputation: 5135

Use this CSS property:

html {
    direction: rtl;
}

Or inline CSS like this:

<html class="no-js" style="direction:rtl">
<h3>عروض الكهرباء أصبحت أكثر تنافسية 
</h3>

                <p>
                    لقد تغيرت الكهرباء في نيو ساوث ويلز. فرفع القيود الرقابية عن الكهرباء يعني خطط أكثر تنافسية للكهرباء، والمزيد من الخيارات، وانخفاض أسعار الكهرباء في نيو ساوث ويلز؛ الأمر الذي يعود بالنفع على المنازل والشركات الصغيرة.
                </p>

Upvotes: 2

Related Questions