scipper
scipper

Reputation: 3153

Strange behaviour with direction: rtl and closing braces at the end of the sentence

I have some text with a braced part at the end and the containing div has the Css property direction: rtl;. This causes the closing brace to appear at the beginning of the sentence as opening brace.

So

Some text with (braces)

becomes

(Some text with (braces

#strange-behaviour {
  direction: rtl;
}
<div id="strange-behaviour">
  Some text with (braces)
</div>

Here is a working fiddle.

My question

How can I motivate the closing brace to stay the closing brace?

Upvotes: 2

Views: 431

Answers (1)

Ujith Nimantha
Ujith Nimantha

Reputation: 305

You can add LRM character after the last bracket:

#strange-behaviour {
  direction: rtl;
}
<div id="strange-behaviour">
  Some text with (braces)&lrm;
</div>

Upvotes: 3

Related Questions