PDA

View Full Version : Image Scaling Woe


devpwnt
06-26-2006, 06:27 PM
I'm working on a photoblog and am having difficulties with scaling the images.

I'm trying to make the images fit in a certain width (90%) (but not take up this space, I'm using max-width). But the problem arises that the height does not scale to fit it, so it appears stretched out. How can I scale the height as the width goes, to make the image look natural?

Thanks.

blinking8s
06-27-2006, 07:23 AM
well, you cant really make a photo stretch like that...it will never look right, pixelation and distortion will take place, depending on the users video card and browser the clarity of the image will be different, but never perfect unless at the edited size.

if you are not getting the height to work right, then check your html doctype, height was depreciated in xhtml.

but iin the future...do try to post a link so we can look at the code.