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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Non-breaking dash?

Status
Not open for further replies.

mkrausnick

Programmer
Apr 2, 2002
766
US
Is there such a thing as a "non-breaking" dash, similar to " " for spaces, and if so, what is it?

Thanks,

Mike Krausnick
Dublin, California
 
There are en dash (–) and em dash (—) but I don't know if any of those are non-breaking. I suppose you could control the non-breakingness via css's [tt]white-space: nowrap;[/tt] declaration.
 
Good call.
Code:
.nowrap { white-space: nowrap }
does indeed inhibit wrapping on dashes.

Another interesting observation is that in a page with a valid doctype, this behavior (wrapping on dashes) does not occur in Firefox 1.5 but does occur in IE6.

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top