|
Posted by Summercool on 10/23/07 01:42
On Oct 22, 6:10 pm, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> img {max-width: 100px;}
>
> or
>
> img {max-height: 100px;}
>
> <img class="landscape" src="pic.jpg" ...> and in your css, put
> only a width, say 100px. It will find its natural height.
>
> <img class="portrait" src="pic.jpg" ...> and in your css, put
> only a height, say 100px. It will find its natural width.
I think max-width and max-height both work in Firefox and Safari (the
latest), but not on IE 7.0....
that's a great solution, landscape and portrait....
is it true you still have to use javascript to tell whether it is
landscape or portrait if the picture is unknown beforehand from the
database?
at least I can pass a parameter to the next .php file saying whether
it is landscape or portrait and that can be cleaner than passing the
width x height.
Navigation:
[Reply to this message]
|