/    Sign up×
Community /Pin to ProfileBookmark

browser is flipping my text from ltr to rtl

Hello

I am trying to display some text from the database.
The text is: “Welcome to my site!”. This text is displayed always in English, no matter what the language the site is in (the site is multi-lingual)

The dir attribute of my html page can either be ‘ltr’ or ‘rtl’ (depending on the current language of the site).
If it is ltr, then the text is displayed properly.
However, if the attribute is set to rtl, the browser flips the location of the ‘!’ and displays the text: “[COLOR=Red]![/COLOR]Welcome to my site”

Is there a way to cause the browser to take the string as a whole and not break it into portions (“Welcome to my site” and “!”)?

thanks in advance

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundryApr 30.2004 — I'm not terribly familiar with webpage bidirectionality, but perhaps you could use [url=http://www.w3.org/TR/html401/struct/dirlang.html#edef-BDO]<BDO>[/url]?

Adam
Copy linkTweet thisAlerts:
@davidklonskiauthorApr 30.2004 — I solved the problem.

I enclosed the text inside a <div> tag and gave it its own dir attribute set to 'ltr'
×

Success!

Help @davidklonski spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...