2

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?

VXp
  • 11,598
  • 6
  • 31
  • 46
scipper
  • 2,944
  • 3
  • 22
  • 45
  • Seems fine on FF, but chrome and safari are no good. Looks like a bug, but already answered on SO – Huangism May 22 '18 at 12:42
  • 1
    Possible duplicate of [brackets displays wrongly for right to left display style](https://stackoverflow.com/questions/5741522/brackets-displays-wrongly-for-right-to-left-display-style) – Huangism May 22 '18 at 12:44
  • @Huangism somehow a duplicate. Ujnimz answer fits my problem a bit more precise. – scipper May 22 '18 at 12:46

1 Answers1

3

You can add LRM character after the last bracket:

#strange-behaviour {
  direction: rtl;
}
<div id="strange-behaviour">
  Some text with (braces)&lrm;
</div>
scipper
  • 2,944
  • 3
  • 22
  • 45
Ujith Nimantha
  • 167
  • 1
  • 16