images always in the same line (like word-wrap)
images always in the same line (like word-wrap)
am 05.05.2007 00:16:03 von ffreino
Hi,
This is a tricky problem (at least for me) I would like to print a
movie title and then its score using stars (img tags)
For example ( where * stands for ) :
Spiderman 3 * * * * *
The Shining * * *
The problem arise when there is no width enough to print the whole
line, so it prints:
Spiderman 3 * * *
* *
The Shining * * *
How can I keep several images in the same line?
Thanks.
PS-. Those scores aren't real :B
Re: images always in the same line (like word-wrap)
am 05.05.2007 00:24:49 von dorayme
In article
<1178316963.389614.180200@y5g2000hsa.googlegroups.com>,
ffreino@gmail.com wrote:
> Hi,
> This is a tricky problem (at least for me) I would like to print a
> movie title and then its score using stars (img tags)
>
> For example ( where * stands for ) :
>
> Spiderman 3 * * * * *
> The Shining * * *
>
> The problem arise when there is no width enough to print the whole
> line, so it prints:
>
> Spiderman 3 * * *
> * *
> The Shining * * *
>
> How can I keep several images in the same line?
>
Make them smaller so they fit on the line? Have small margins and
padding? What are you really asking? You can't get ten elephants
in a tent with room for only five.
--
dorayme
Re: images always in the same line (like word-wrap)
am 05.05.2007 00:32:04 von Ben C
On 2007-05-04, ffreino@gmail.com wrote:
> Hi,
> This is a tricky problem (at least for me) I would like to print a
> movie title and then its score using stars (img tags)
>
> For example ( where * stands for ) :
>
> Spiderman 3 * * * * *
> The Shining * * *
>
> The problem arise when there is no width enough to print the whole
> line, so it prints:
>
> Spiderman 3 * * *
> * *
> The Shining * * *
>
> How can I keep several images in the same line?
Just set style="whitespace: no-wrap" on the container.
Re: images always in the same line (like word-wrap)
am 05.05.2007 02:19:35 von dorayme
In article
,
dorayme wrote:
> In article
> <1178316963.389614.180200@y5g2000hsa.googlegroups.com>,
> ffreino@gmail.com wrote:
>
> > Hi,
> > This is a tricky problem (at least for me) I would like to print a
> > movie title and then its score using stars (img tags)
> >
> > For example ( where * stands for ) :
> >
> > Spiderman 3 * * * * *
> > The Shining * * *
> >
> > The problem arise when there is no width enough to print the whole
> > line, so it prints:
> >
> > Spiderman 3 * * *
> > * *
> > The Shining * * *
> >
> > How can I keep several images in the same line?
> >
>
> Make them smaller so they fit on the line? Have small margins and
> padding? What are you really asking? You can't get ten elephants
> in a tent with room for only five.
Sorry, now I see what you want... as Ben C says I guess.
--
dorayme
Re: images always in the same line (like word-wrap)
am 05.05.2007 03:49:30 von Joel Shepherd
In article ,
Ben C wrote:
> On 2007-05-04, ffreino@gmail.com wrote:
> > Hi,
> > This is a tricky problem (at least for me) I would like to print a
> > movie title and then its score using stars (img tags)
> >
> > The problem arise when there is no width enough to print the whole
> > line, so it prints:
> >
> > Spiderman 3 * * *
> > * *
> > The Shining * * *
> >
> > 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. If you use "*" as alt text, you might still want to use the
CSS hint, but the image itself won't be wrapped across lines.
--
Joel.
Re: images always in the same line (like word-wrap)
am 05.05.2007 10:31:08 von Ben C
On 2007-05-05, Joel Shepherd wrote:
> In article ,
> Ben C wrote:
>
>> On 2007-05-04, ffreino@gmail.com wrote:
>> > Hi,
>> > This is a tricky problem (at least for me) I would like to print a
>> > movie title and then its score using stars (img tags)
>> >
>> > The problem arise when there is no width enough to print the whole
>> > line, so it prints:
>> >
>> > Spiderman 3 * * *
>> > * *
>> > The Shining * * *
>> >
>> > 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. If you use "*" as alt text, you might still want to use the
> CSS hint, but the image itself won't be wrapped across lines.
You might end up with
Spiderman 3
* * * * *
in that case.
Re: images always in the same line (like word-wrap)
am 05.05.2007 11:00:33 von jkorpela
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
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, ... 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/
Re: images always in the same line (like word-wrap)
am 05.05.2007 11:19:03 von Ben C
On 2007-05-05, Jukka K. Korpela wrote:
> 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
> 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
Oops, yes it is "white-space" and "nowrap", not "whitespace" and "no-wrap".
[...]
> Alternatively, ... 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.
In that case why not go back to , etc. for when CSS is
disabled?
Re: images always in the same line (like word-wrap)
am 05.05.2007 15:29:34 von jkorpela
Scripsit Ben C:
>> Alternatively, ... 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.
>
> In that case why not go back to ,
etc. for when CSS is
> disabled?
Because writing ...
inside each block in each document where you wish to use it is more
cumbersome than writing, say, body { font-family: Constantia, Georgia,
sans-serif; } just once in a stylesheet. Compare this with the difference
between
A-1
and
A-1
(where the author misspells white-space or nowrap every other time :-) ).
Similarly, using h1 { text-align: center; } in a site-wide style sheet is
just _simpler_ than using ...
or even
align="center">....
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: images always in the same line (like word-wrap)
am 07.05.2007 13:55:18 von ffreino
Thanks a lot (I wrote a message two days ago but it wasn't send it, I
don't know why)
and style="whitespace: no-wrap" are really good.
'stars3.jpg, stars4.jpg, stars5.jpg' was a good idea but a php loop is
better than a mspaint session.
Thanks.