How to force a piece of text to be 'direction ltr' inside a 'direction rtl' paragraph

Jonathan picture Jonathan · Dec 1, 2010 · Viewed 12.9k times · Source

So, phone numbers are always ltr (left to right).

Working on a multilingual website I need to insert a phone number (with a '+' prefix and numbers separated by '-') inside a text paragraph that has direction rtl (for relevant languages of course)

So I have something like this:

Of course this is not working because 'direction' only works for block elements and 'span' is an inline element. I need the phone number to be inside the paragraph so I can't change 'span' to 'display:inline'

I'm being clear?

How to make it work?

Answer

Daniel picture Daniel · Dec 1, 2010

Try adding #phone {direction:ltr; display:inline-block}