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:
.ltr #test {direction:ltr}
.rtl #test {direction:rtl}
#phone {direction:ltr}
<div class="ltr"><p id="test">Please call to <span id="phone">+44-123-321</span> for some help.</p></div>
<div class="rtl"><p id="test">Please call to <span id="phone">+44-123-321</span> for some help.</p></div>
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?
LTR
orRTL
of the container. Are you actually seeing this issue or simply trying to preempt? – Oded+
character, then the first number from the left, then the second number from the left, and so on. You may be trying to fix something which isn't actually a problem. – Flimm