W3C home > Mailing lists > Public > www-html@w3.org > April 2002

Re: Alternative to NOBR tag?

From: Tantek Çelik <tantek@cs.stanford.edu>
Date: Thu, 18 Apr 2002 11:16:06 -0700
To: mgreisman@scanalytics.com, www-html@w3.org, DDelaney@PowerCreative.com
Cc: "www style w3.org" <www-style@w3.org>
Message-id: <B8E45B75.B604%tantek@cs.stanford.edu>
On 4/12/02 9:23 AM, "mgreisman@scanalytics.com" <mgreisman@scanalytics.com>
wrote:

> I had almost the same problem with multiple words that I did not want to
> break. For example:
> | Menu Item 1 | Menu Item 2 | Menu Item 3 |
> 
> The good folks in the HTML Writer's Guild recommended I use non-breaking
> spaces between the words I didn't want to break. Oh, yeah, "non-breaking"
> means something!

Since it is presentation you are concerned with, it is perhaps better to use
a presentational solution (rather than a content solution), e.g. style your
sequence of multiple words that you don't want to break with

 white-space:nowrap;


> This doesn't quite solve Dan's problem with hyphens within phone numbers, but
> it might help...

Precisely - in general you have to use a proper presentational solution
anyway.


> So, what's the final word on the nowrap style? Are we supposed to use that for
> inline elements or not?

Yes, you are.

From the public CSS1 Errata:

 http://www.w3.org/Style/css1-updates/REC-CSS1-19990111-errata.html

"
Section 5.6.2 'white-space'

[2001-08-28] The 'white-space' property applies to all elements, not just
block-level elements.
"

This is also what the CSS1 Test Suite tests:

 http://www.w3.org/Style/CSS/Test/CSS1/current/sec562.htm

and what popular browsers implement (from many vendors, for many platforms).


Tantek
Received on Thursday, 18 April 2002 14:12:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:51 GMT