You are here: Re: Hyphens and IE, an observation « HTML « IT news, forums, messages
Re: Hyphens and IE, an observation

Posted by Nick Theodorakis on 10/27/07 00:58

On Oct 25, 6:07 pm, "Jukka K. Korpela" <jkorp...@cs.tut.fi> wrote:
[...]
> Oh well, there's one point worth mentioning I guess. Browsers such as IE
> treat any hyphen as allowing a line break after it, so "B-Z" might be broken
> into "B-" at the end of a line and "Z" at the start of the next line. But
> the same may happen for an expression using the en dash, and you generally
> need to use markup or CSS to avoid these problems, such as
> <nobr>B-Z</nobr> (nonstandard but simple)
> or
> <span class="nobr">B-Z</nobr>
> with
> .nobr { white-space: nowrap; }
>
[...]

What about marking up with <nobr>B-Z</nobr>, and then still including
in the style sheet:

nobr { white-space: nowrap; }

Or would that be too silly?

I can imagine a situation in which a browser might not understand
<nobr> (although I don't know any that don't -- today) but might still
apply styling to any element even if doesn't understand it (as do
Firefox and Opera, at least). And it would still work if the browser
does understand <nobr> but the user has disabled style sheets, for
some reason.

Nick

--
Nick Theodorakis
nick_theodorakis@hotmail.com
contact form:
http://theodorakis.net/contact.html

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация