> Subject: [css-d] Can images be dynamically resized proportionally
> with minand max sizes?
>
>
> Is there any way, using css, to resize both the height and width
> of an HTML
> element like an image to the same percentage based on the width of the
> browser window?
>
> Ideally, I'd like to give a minimum and maximum size (height and width),
> too.
>
> In other words, I want to make sure my image is displayed at a
> 50% width and
> the height is adjusted proportionally so the image never looks
> stretched in
> one way and not the other. But I would also like to make sure it
> never goes
> smaller than 200 pixels wide and never exceeds 700 pixels wide,
> how can I do
> this?
>
> - Craig
You can certainly define an image using em's. Just divide the pixels by 16
and have code like
".image1{width:12.5em;height:6.25em;border:none}
html
<img class="image1" src="/myimage.gif">
I guess you could also define the max and min width but that ol' bugger IE6
will need something else.
I have not actually gone as far as defining the max and min width/height so
will be interested in others views.
Have a look at Tedd's article on this:
http://sperling.com/examples/zoom/
Cheers
Ian
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/480 - Release Date: 17/10/2006
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/