Resizing images relative to window size

Hakon Lie (
Wed, 3 Jul 1996 12:10:28 +0200

Date: Wed, 3 Jul 1996 12:10:28 +0200
Message-Id: <>
To: James Aylett <>
Cc: Tom Magliery <>,
Subject: Resizing images relative to window size
In-Reply-To: <>
From: Hakon Lie <>

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.




Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France