[thelist] How to NOBR? / Evolt search

Joe Crawford jcrawford at avencom.com
Thu Mar 29 14:05:10 CST 2001


Beau Hartshorne wrote:
> The <nobr> tag is deprecated. So what's the new way of ensuring phone
> numbers and the like stay on the same line?

Not just deprecated - it was strictly proprietary.

I'm a big fan of <nobr> - lots of nice uses and pretty good support.
Great for when you want to have liquid content. that breaks nicely.

So your headline:
	All Your Headline Are Belong To Us

Would never break as:
	All Your Headline Are Belong To
	Us

You could do this:
	<p>All Your Headline <nobr>Are Belong To Us</nobr></p>

So that it would break only as 
	All Your Headline
	Are Belong To Us
or stay on one line.

*but* you knew that already.

As to how you're *supposed* to do it now... there's a CSS property --
"white-space: nowrap"
which theoretically would do the same thing.
	http://www.w3.org/TR/REC-CSS1#white-space

So you could do:
<style type="text/css">
<!--
.nobr { white-space: nowrap; }
//-->
</style>
	<p>All Your Headline <span class="nobr">Are Belong To Us</span></p>

No idea about support for that.

HTH,
	Joe <http://artlung.com/>
--
Joe Crawford ||||||||||||||       mailto:jcrawford at avencom.com
||||||||||||||||||||||||             http://www.avencom.com
|||||||||||||||||||||||||||      Avencom: Set Your Sites Higher




More information about the thelist mailing list