tobyaw: (Default)
Toby Atkin-Wright ([personal profile] tobyaw) wrote2008-10-22 09:50 pm

Non-breaking hyphens

There are those of you out there who like to write ‘e-mail’ instead of email. Unfortunately this, and similarly hyphenated words, can produce some nasty line wrapping. The Unicode standard includes a non-breaking hyphen, 0x2011, but I understand that there may not be consistent browser and font support for this.

An alternative when writing for the web is to use CSS to mark the work in question as non-wrapping, such as <span style="white-space: nowrap;">e-mail</span>. It mark-up is a bit verbose, but it helps to stop lines ending with a nasty ‘e-’.

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org