Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hmmm... a "non-breaking hyphen"? 2

Status
Not open for further replies.

Rydel

Programmer
Feb 5, 2001
376
CZ
A bit unsual question... Is there a non-breaking hyphen (or minus sign) that always sticks with the next word. E.g. I have a string in HTML file "Belarus -Minsk" and I want that "minus" always stick together with "Minsk." How this can be achieved? I've looked through the character entity list in HTML 4 specs but couldn't find anything of this sort.


regards,
rydel n23
 
Not sure how supported if at all anymore, but try:
<NOBR>Belarus -Minsk</NOBR>

That's a No Break tag.

DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
<nobr> is not standard HTML (though it works on most browsers). If you want your pages to validate, you can use CSS thus:
[tt]
<span style=&quot;white-space: nowrap;&quot;>Belarus - Minsk</span>
[/tt]

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
Perfect, thanks a lot, guys (well-deserved stars :))! I completely forgot about <nobr>, and as of CSS it hasn't crossed my mind that it could be solved via CSS definition.


regards,
rydel n23
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top