Let's say you have a help text with a button like:
<label>This is a short help text <button>(?)</button></label>
If you shrink the window size, at some point a line break happens, and the button ?
is alone at the second line.
This is a short help text
(?)
So the UX Team said, the (?)
button should't be alone at second line, instead the last word and button.
This is a short help
text (?)
Does anyone know how to solve it with regular CSS?
Because we are using React, I suggested to break the sentence, and create a non breakable part out of the last word and the button, however, it feels like an ugly hack, so we are looking for a clean CSS solution if possible.
UPDATE: Already found a solution here:
How can I use a non-breaking space before an inline-block-default element, such as a <button>?