Anton
Anton

Reputation: 6033

Preventing line breaks in japanese text with word joiner

I'm having a div with Japanese text with two words as described below and I want to prevent a line breaks in between them.

<div>全界</div>

I have tried using a unicode word joiner between them, &#8288;, but it only seems to print a square and does not prevent a line break.

<div>全&#8288;界</div>

Result: 全⁠界

Anyone who could share some insights on this?

Upvotes: 0

Views: 1035

Answers (2)

dippas
dippas

Reputation: 60563

Your result doesn't show any line break between those 2 characters.

Although to prevent linebreaks use white-space:nowrap

div {
  white-space: nowrap
}
<div>全界</div>

Upvotes: 1

Mr N Dynamite
Mr N Dynamite

Reputation: 487

Try wrapping your div in nobr

<nobr><div>全界</div></nobr>

Upvotes: 0

Related Questions