On 8 Jul 2008, at 02:33, Matt 0000 wrote:
From your earlier email I'm starting to gather that if an image is wider than the width of the div (or even browser window), auto- fitting isn't going to be a problem.
If your image is wider than the div then auto fitting won't be a problem... except that it's not really auto fitting because the image doesn't get shrunk to fit a small div any more than it gets stretched to fit a big one. What happens is that it gets clipped/cropped. So if you're happy for clipping to occur, and your image is bigger than the div, you're good.
So, if the image is smaller in width (like in my case), should I guess there's no way to stretch it without CSS 3 support ?
Nope, not that I know of -- at least not as a background image. You can clip them, you can repeat them, you can offset them... but you can't stretch them. An img element, on the other hand, *can* be stretched... but the results, as Kepler stated, will not be pretty because, unlike the process of enlarging an image in, say, Photoshop, no extra pixels are created -- so the resolution change tends to be gruesome. It's dealt with slightly better by some browsers/operating systems than others, but it's never good.
One option is to modify the right hand end of your image so that it will tile nicely along the horiziontal (ie. repeat-x). Make a small repeating tile of that end and use it to fill the div. Then you can either insert an img element or apply background image to some other element that's already inside the div. Where the img ends the tiled image takes over, hopefully seamlessly.
HTH -- Rick Lecoat www.sharkattack.co.uk ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************
