- From: Tantek Celik <tantek@cs.stanford.edu>
- Date: Wed, 01 Aug 2001 10:40:02 -0700
- To: Dan Delaney <DDelaney@PowerCreative.com>, www-html@w3.org
From: "Dan Delaney" <DDelaney@PowerCreative.com> Subject: Alternative to NOBR tag? Date: Wed, Aug 1, 2001, 9:57 AM > Hello all. > > Forgive me if this issue has been resolved, but I couldn't find an answer in > the archives or anywhere else. > > I strive to make XHTML files that validate. But when I have something like a > phone number or social security number that I don't want the browser to > break apart I have to use the <nobr> tag to do that. The <nobr> tag, > however, keeps the page from validating. Unfortunately, I can't find any > kind of "break" style in the CSS spec that would allow me to create a class > that would tell the browser to do basically what the <nobr> tag > does--something like <span class="PhoneNumber">999-999-9999</span>. > > Is there an alternative to the <nobr> tag In your example, this style rule: .PhoneNumber { white-space: nowrap; } > that works in all of the browsers? That works in all browsers that support all CSS1 properties (of which there are now several). > And if not, why has the <nobr> tag been depricated without a viable > alternative? In this case there is a viable alternative, but often tags are deprecated as soon as a _recommended_ (read: in a W3C REC) alternative is available, which may occur sometime before such alternative has gained enough widespread adoption to be considered viable. Hence we have "transitional" and "legacy". Tantek
Received on Wednesday, 1 August 2001 13:39:26 UTC