|
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/
[Back to original message]
|