Solution 1 :

Remove the “normal” spaces around   – so:

<div>
  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBB&nbsp;CCCCCC
</div>

&nbsp; is a space itself, it does not affect surrounding white-spaces.

Problem :

I thought '&nbsp;' prevent to break word.

But it doesn’t work as I expected.

<div>
  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBB &nbsp; CCCCCC
</div>

the result
But I thought it will be like this.↓

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 
BBBBBBBB  CCCCCC

because break word between ‘BBBBBBBB’ and ‘CCCCCC’ is prevented.

But the result is as you see,

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBB  
CCCCCC

depends on window size.

How can I prevent break word using '&nbsp;'?

Comments

Comment posted by Akao

Ahhhhh, I see. I was so stupid!!! So I was trying to prevent break word between normal spaces!!!! HaHa! Thank you!!!

Comment posted by Bartosz Pachołek

Great, so if that helped you I kindly ask to mark my response as “Answer” so it helps other people to instantly know that this has been resolved.