non breaking dash

  • Thread starter =?iso-8859-15?Q?Jens_M=FCller?=
  • Start date
?

=?iso-8859-15?Q?Jens_M=FCller?=

Hello,

I want to prevent that a word like "Company-Name" is broken at the end
of the line at the "-".
With spaces, I would use "nbsp", but how to do this with a dash?

Thanks!
 
B

Bobbo

Jens said:
I want to prevent that a word like "Company-Name" is broken at the end
of the line at the "-".

Try ‑

e.g.
Badger‑Botherer

Although that may have some restrictions based on what encoding you're
using - can anyone else advise?
 
J

Jukka K. Korpela

Bobbo said:

That's non-breaking hyphen. It's probably what the OP really _meant_,
though. But it doesn't really work, due to browser limitations.

The practical approach is to use the nonstandard <nobr> markup around the
string that should not be broken across lines, as in
<nobr>Company-Name</nobr>
For more info, see
http://www.cs.tut.fi/~jkorpela/html/nobr.html
Although that may have some restrictions based on what encoding you're
using - can anyone else advise?

The encoding has nothing to do with that. The meaning of ‑ is
completely independent on the encoding of the page.
 
B

Bobbo

Jukka said:
The practical approach is to use the nonstandard <nobr> markup around the
string that should not be broken across lines, as in
<nobr>Company-Name</nobr>
For more info, see
http://www.cs.tut.fi/~jkorpela/html/nobr.html

The encoding has nothing to do with that. The meaning of ‑ is
completely independent on the encoding of the page.

Thanks for pointing that out, that's more useful than a list of search
results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top