Reversing text for arabic

I am working on a website for a client where they have had all their text translated into arabic. I now have the task of styling the text so it reads correctly.

I have the text right aligned I just cannot get the text in my style sheed to reverse so that the text is legible in arabic.

I have googled everything I can think of and tried direction :rtl; and changed the doc type with no success :frowning:

CSS:

direction: rtl; unicode-bidi: bidi-override;

[ot]The JS way

<div id="content">This will become reversed!</div>
<script type="text/javascript">
function strrev(str) {
   if (!str) return '';
   var revstr='';
   for (i = str.length-1; i>=0; i--)
       revstr+=str.charAt(i)
   return revstr;
}
document.getElementById('content').innerHTML = strrev(document.getElementById('content').innerHTML);
</script>

Downside being in either the JS or PHP way you will reverse your tags if you have any bolding or any other type of formating.[/ot]

unless your fancy JS script accounted for that…

if (strong) { NO REVERSE }

lol