- From: Manos Batsis <m.batsis@bsnet.gr>
- Date: Thu, 7 Feb 2002 10:32:18 +0200
- To: "Einar Westermann" <einar.westermann@online.no>
- Cc: <www-style@w3.org>
> -----Original Message----- > From: Einar Westermann [mailto:einar.westermann@online.no] > Is there no way in CSS to scale an image both proportionally > and within a > containing block by a percentage of its intrinsic dimensions? Pardon me but I cannot understand the reason for presenting your query like that. Why not give a value relative to the container value (in %)? If you know the normal dimensions of the image, you can give those to the image container instead; then use percentage values as dimensions for the image. Suppose you have a 100*50px image: <div style="width:100px;height:50px;"> <img src="myImage.png" style="width:50%;height:50%;"/> </div> That will give you the image in half of the original size. But I'm sure you probably need a more dynamic solution; could rephrase your query to show the problem leading you in this? Kindest regards, Manos
Received on Thursday, 7 February 2002 03:29:19 UTC