Posted by Benjamin Niemann on 07/12/06 21:06
Michael Laplante wrote:
> Is there a way to re-size an image when a user re-sizes their window so
> that resizes proportionately?
>
> I've seen this done before but I think in that case, the image was set as
> a background image for the page. I want to display a "photoalbum" where
> the image resizes proportionately. My gut feeling is that it can't be done
> but maybe somebody knows different?
>
> Also, I would prefer to accomplish it without scripts.
You can specify the image size in % via CSS (WIDTH and HEIGHT attributes for
the IMG element are always in px).
I would not recommend to do so though. Scaling algorithms of browsers are
usually a PITA and anything except the unscaled image looks like crap.
BTW: Scaling background images is not yet possible. It will come with CSS3
and some browsers may even implement it (or have a similar proprietary
extension of their own), but CSS3 is still draft and details may change.
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
[Back to original message]
|