Re: Scaling

Is there any way to prevent page from being pushed down  by image height
when full image get loaded if we didn't define exact image height?

Best,
Nikola
http://www.usedbatonrougecars.com/


On Jan 14, 2008 7:27 PM, fantasai <fantasai.lists@inkedblade.net> wrote:

>
> 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 Tuesday, 15 January 2008 02:04:09 UTC