Page 1 of 1

change width of image (problem in IE)

Posted: Wed Feb 03, 2010 7:12 am
by arbitter
So, I used to use <img src="image" style="max-width: 60%">

But that didn't really work. (Worked in Chrome i think, or at least worked on my localhost, not sure if it worked on site)

So I changed it to
<img src="image" width='60%' height='*'>

But this only works in Chrome, ff and safari, not in IE (I dont know in any other browsers)

How can I fix this, using css/php/html?

Not a hard answer, but I've been searching and can't really find a way that does it properly...

Re: change width of image (problem in IE)

Posted: Wed Feb 03, 2010 5:55 pm
by Christopher
It sounds like an IE6 problem, but you might want to try styling it like div img {width: 50%;}

Re: change width of image (problem in IE)

Posted: Thu Feb 04, 2010 3:55 pm
by arbitter
Well, it's not only Internet Explorer 6, also 8. So I guess all of them. And I can't find a simple, for me to understand solution anywhere.

So this div img{}; does the div go around the image exactly then? I was thinking about doing it with div's, but how I'd done it, it'd be the same as trying to solely change a image width.