Hi, Could you make a div container with position:relative and place the image inside it position:absolute top: 0; right: 0; bottom: 0; left: 0;? I think the image should stretch with the div it is inside. Not sure if this is a valid suggestion but to my mind it seems it would work...
Cheers, Mark On 25/01/2008, Jack Blankenships <[EMAIL PROTECTED]> wrote: > > I have been reading some articles > (http://www.alistapart.com/articles/elastic/ , > http://www.htmldog.com/articles/elasticdesign/demo/ , > http://www.antix.co.uk/code/css/imposing_minimum_width/example_3.htm , > etc), but I am not finding the answer I am looking for. > > I want to have an image (several images) that are dynamically > sized/fluid based on the browser window/viewport dimensions. I have a > layout where the divs can be percentages of the available height and > width, but it seems that whether I put the image inside the div or as > a background-image I cannot get it to adjust based on the window > dimensions. When I set the width or height to 100% using css, the > image is set to 100% of its original size, without respect to its > container. > > I suppose that it makes things more complicated that I need to > preserve the dimensional relationship between the height/width > > The closest example I have seen to getting this to work is at > www.opera.com, but the height of the images never changes, and the > image gets out of proportion during resizing events. I also found > that http://www.cssplay.co.uk/layouts/background.html resizes both > dimensions, but not in equal ratios and seems to only work on body > backgrounds. > > I need some help with a css solution for this, and if some javascript > integration is necessary, then sobeit. > > Thanks, > ______________________________________________________________________ > css-discuss [EMAIL PROTECTED] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/