Forum Moderators: open

Message Too Old, No Replies

image being non-uniformly scaled in IE

         

badgering

9:30 am on Jan 17, 2007 (gmt 0)

10+ Year Member



Hi, i created some JS that creates an IMG tag and sets the class attribute to a particular style.

Then i noticed that it didnt work in IE. So a quick little change got it working.

Now, the style sets the width of the IMG tag to 100px. In IE this is non-uniformly scaling the image! What is wrong with that browser! Anyhow has anyone seen this before? Do you know why this is happening and how to fix it?

Thanks

whoisgregg

4:44 pm on Jan 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Perhaps setting the image height to auto will solve it?

img { width: 100px; height: auto; }

badgering

6:21 pm on Jan 18, 2007 (gmt 0)

10+ Year Member



nice :) it works.

Cheers