You are here: Re: Resize image dynamically « HTML « IT news, forums, messages
Re: Resize image dynamically

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/

 

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

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