html - How to force a piece of text to be 'direction ltr' inside a 'direction rtl' paragraph -
so, phone numbers ltr (left right).
working on multilingual website need insert phone number (with '+' prefix , numbers separated '-') inside text paragraph has direction rtl (for relevant languages of course)
so have this:
.ltr #test {direction:ltr} .rtl #test {direction:rtl} #phone {direction:ltr} <p id="text">please call <span id="phone">+44-123-321</span> help</p>
of course not working because 'direction
' works block elements , 'span
' inline element. need phone number inside paragraph can't change 'span
' 'display:inline
'
i'm being clear?
how make work?
you can use unicode directionality marker character before +
sign give algorithm hint needs.
these are:
ltr: 0x200e rtl: 0x200f
so:
<p id="text">please call <span id="phone">0#x200f;+44-123-321</span> help</p>
see this answer more details.
Comments
Post a Comment