2 replies [Last post]
joey
joey's picture
Offline
newbie
Atlanta, GA, USA
Last seen: 16 years 12 weeks ago
Atlanta, GA, USA
Timezone: GMT-4
Joined: 2004-07-02
Posts: 5
Points: 0

Hi all,

I've got an e-mail address with a hyphen that wraps to the next line in the middle of the addy in IE with certain screen-width settings.

(http://www.oaug.org/articles/2004-06CharlesPhillipsMessage.shtml if it helps to see it. E-mail addy is near the bottom of the article.)

Is there any standard-compliant way to prevent wrapping in an inline text element? I know about <nobr></nobr>, but I'd rather use standard-compliant CSS to accomplish this if I can. (This Web site, which I have inherited, is anything BUT standard-compliant, and I'm trying to move it in the right direction.)

While I'm at it, is there a CSS replacement for the deprecated nowrap attribute of the table data HTML tag?

Thanks all,
-- Joey

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 23 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

Inline word-wrap prevention

You can use the CSS declaration:

a.nowrap
	{
	white-space: nowrap;
	}

Probably best to give that anchor a class though, such as a.nowrap.

Wink

The next sentence is true. The previous sentence is false. Discuss...

joey
joey's picture
Offline
newbie
Atlanta, GA, USA
Last seen: 16 years 12 weeks ago
Atlanta, GA, USA
Timezone: GMT-4
Joined: 2004-07-02
Posts: 5
Points: 0

Thanks!

Works brilliantly. Thanks!

That's exactly what I was looking for, I just didn't know where to find it in the CSS spec (and spent much too much time looking for it :? ).

Thanks!!!
-- Joey