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...
change width of image (problem in IE)
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: change width of image (problem in IE)
It sounds like an IE6 problem, but you might want to try styling it like div img {width: 50%;}
(#10850)
Re: change width of image (problem in IE)
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.
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.