- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Mon, 14 Jan 2008 13:27:48 -0500
- To: Michael <newsletters@codefisher.org>
- CC: www-style@w3.org
Michael wrote: > > I have a fluid layout so it changes width because of the browser > window. There is the slight problem that some of the images I use might > be too wide. So I use max-width:100% to prevent this from happening. > This works great when the image does not have a width or height > attribute set. The image remains in proportion. One site you can see > this working on is http://accessfirefox.org/ (resize your window small > and the first image in the content will change size in any browser the > understands max-width) . But if the height attribute is set, it retains > this height and the image goes out of proportion (take for example the > image along the top of the content on > http://codefisher.org/format_toolbar/). I think we need some property > for this; say for example: > > img { > scale:proportional; > } > > With maybe the other possible value being auto. I think this would be a > great use when max-width and max-height become more widely used. Set img { height: auto; } and your images should size proportionally. ~fantasai
Received on Monday, 14 January 2008 18:27:59 UTC