Reputation: 115
I have a series of input labels:
<label>
<abbr>*</abbr>
Label Text Here
</label>
On browser resize some labels wrap like this:
*
Label
Text Here
Ideally text should not break between the asterisk and the first word-- like so:
* Label
Text Here
I can't use
/change the HTML because my inputs and labels are automatically generated and I don't have control over the HTML output. I'm looking for pure CSS solution. Thank you in advance!
Upvotes: 1
Views: 856
Reputation: 9348
Add white-space: nowrap;
to label
This will not wrap your text on to next line.
label {
white-space: nowrap;
}
<label>
<abbr>*</abbr>
Label Text Here
</label>
Upvotes: 1