So I have the text
e-commerce and I don't want the line to wrap at the dash.
How would I restrict wrapping for that text line?
preguntado el 28 de agosto de 11 a las 04:08
Wrap it in the
<nobr>…</nobr> tag, or if you care out the validity of your HTML, set the
white-space: nowrap; estilo.
There is this non-breaking hyphen (copy and paste it):
‑ o usar
Note that this is the only unicode “character” which unifies the following characteristics:
- is pre-composed (you can make anything non-breaking by composition)
- is non-breaking
- is a hyphen or dash or similar
El uso de la word joiner representado por
⁠ allows for other hyphens. Results:
e‐commerce (hyphen followed by word joiner)
e‑commerce (ASCII hyphen/minus followed by word joiner)
...and the precomposed one for reference:
e‑commerce (non-breaking hyphen)
http://jsfiddle.net/NR5Ch/58/ (this fiddle shows the effect of the word joiner)