View Full Version : hyphen word wrap
Bill Hosmon
11-18-2003, 11:29 AM
Is there a way in html to keep a word from dividing into the next line if it has a hyphen? I tried to use a non breaking space, but then that puts a space in the word. I want it hyphenated with no space.
New at html. Thanks.
DCElliott
11-18-2003, 12:00 PM
Try inserting this entity − which is the Unicode character represented by the following: & #8722; (you must remove the space between the & and the # in actual use ) When using it you don't leave any space on either side so that it looks like non−breaking hyphenation
DE
And welcome to the forums. :weee:
Normally I let Animgirl answer this sort of question but she's asleep at the switch today I guess :p
Bill Hosmon
11-18-2003, 12:09 PM
That certainly takes care of the word wrap problem.
Now, if there were only some way to make it look like the other hyphens--it looks (HUD−1) longer and thinner than the other hyphens (HUD-1). It looks even more pronounced that this on my screen. Thank you.
Daybreak_0
11-18-2003, 12:51 PM
Either replace all, or use this
put in style sheet
.dontwrap {white-space: nowrap;}
put around offending text in body
<span class="dontwrap">HUD-1</span>
Regards
Day
DCElliott
11-18-2003, 03:22 PM
Go with Day's method - it is superior and uses <span> as it was intended. Incidently the effect is the same as using the old IE proprietary <nobr></nobr> tags.
DE
Bill Hosmon
12-02-2003, 11:48 AM
After reading up a little more on CSS, I got some time to play with this today. Tested and it works fine! Thanks Daybreak and DC!
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.