Re: Resizing images relative to window size

On  3 Jul 96 at 12:10, you wrote:

> James Aylett writes:
> 
>  > My initial reaction was
>  > "How do I scale down the page?", but after a while I decided that what I
>  > really wanted to do was scale the images with respect to the page width -
>  > ie, in a similar way to using <TD WIDTH=50%> I'd have <IMG ... WIDTH=50%>
>  > for each.
> 
> This can easily be expressed in CSS [1]:
> 
>   <IMG .. STYLE="width: 50%">
> 
> The percentage refers to the parent element's width which will be
> closely related to -- if not the same as -- the page width.
> 
> Microsoft's Internet Explorer [2] has initial support for CSS, but the
> above has probably not been implemented yet.
> 
> Using CSS, one can set the width on any element. CSS does't specify
> how the scaling is to be performed since different media types scale
> differently. E.g., a text element should scale differently from an
> image element.

True - and the scaling of images is difficult territory. Depending
on the content many formats will not scale satisfactorily and will result
in unacceptable image quailty. Poor scaling may not be apparent for 
pictorial images, but certainly is for line-art.


--
Jon Wallis            Senior Lecturer in Computing / University Webmaster
School of Computing & I.T.,  University of Wolverhampton,  U.K. - WV1 1SB
Phone / Fax +44 (0)1902 322203 / 322680   |   e-mail:  j.wallis@wlv.ac.uk
The University of Wolverhampton Web Page <URL:http://www.scit.wlv.ac.uk/>
--My opinions are not necessarily those of my employer (and vice versa)--

Received on Wednesday, 3 July 1996 09:48:48 UTC