You are here: Re: images always in the same line (like word-wrap) « HTML « IT news, forums, messages
Re: images always in the same line (like word-wrap)

Posted by Jukka K. Korpela on 05/05/07 09:00

Scripsit Joel Shepherd:

>>> How can I keep several images in the same line?
>>
>> Just set style="whitespace: no-wrap" on the container.
>
> Or, alternatively, use one image with five stars, one image with 4
> stars, etc.

That's the best approach, because it lets you use good alt texts that
correspond to the _meaning_ of images, such as <img src="stars5.gif"
alt="excellent">. Surely it is better to hear "excellent" than e.g.
"asterisk asterisk asterisk asterisk asterisk" (or even "star star star star
star").

But if you use copies of the same image, then the _correct_ CSS rule is
white-space: nowrap
(The use of hyphens is surely significant in CSS property and value names,
and partly rather illogical.)

Alternatively, <nobr>...</nobr> could be used. It will make people who swear
by standards upset, and it will make browsers honor the request not to break
the line, even when CSS is disabled.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

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

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