Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid breaking line between two words when resizing [duplicate]

I have a string and I need it not to break two specific words in different lines. Example:

"Ask for it it when contracting until 2016/09/30 with T-2 Rate"

When I resize window and make it smaller there is a moment that it outputs:

"Ask for it it when contracting until 2016/09/30 with T-2 \n
Rate"

I would like T-2 + Rate to be always together. How to do it?

like image 790
veronica jover Avatar asked Sep 21 '16 09:09

veronica jover


1 Answers

Just use <span style="white-space: nowrap"> for nonbreaking parts, as MDN states.

Ask for it it when contracting until 2016/09/30 with <span style="white-space: nowrap">T-2 Rate</span>
like image 105
Nina Scholz Avatar answered Oct 24 '22 05:10

Nina Scholz