Unable to resize images in IE (PHP/HTML)

I’ve got working PHP code that rotates through a variable number of JPG files. I’m sizing the images in the HTML, and this works in FF/Chrome, but not in IE (where the images are displayed without resizing).

[php]<?php do { ?>


<?php } while ($row_sc = mysql_fetch_assoc($sc)); ?>[/php]

Any thoughts on a SIMPLE way that I can get the images to resize in IE, as well? Would prefer to keep the solution to HTML/CSS.

Thanks!

What does it do differently in IE? I don’t see any reason this code would not work.

try clearing all your cache data when you make changes to a web page

Thanks for the quick feedback. I’ve tried clearing the cache but it doesn’t help.

Sorry for not describing the problem better. Basically, IE loads the pictures at their original size (not scaled to the values in the code).

If I take the height & width parameters out of the code, Firefox loads the pics at their original size…that’s what made me think IE is ignoring the sizing.

Does that help?

You must have something else causing the problem. Post your HTML output instead of the PHP code.

[php]<?php do { ?>


<?php } while ($row_sc = mysql_fetch_assoc($sc)); ?>[/php]

can you try something like this? I would love for you to view the source of the messed up page and copy that to here so we can see what is being shown, also would love to see the entire page of code so that we can see what else might be messing with the images!

I tried changing the code to the “style” method, as suggested. When I did, not only did it not correct the problem in IE, but it created the problem in FF!

Here’s the HTML output (copied from IE, but it is the same in FF):

[php]


[/php]

That looks right to me.

Here’s another hint: Even with the HTML as you see above, IE will expand the table cell to the size of the first image it calls. So, if it calls a 600x300 image first, the next 700x350 image gets scaled down to fit. Or if it calls a 700x350 first, the next 600x300 pic gets centered in white space.

Thanks for all the help.

I know this is not a problem with IE specifically. There is something in your code causing this to happen. Maybe post the full HTML page online so we can duplicate the problem?

Thanks to everyone for the guidance. We’ve narrowed the problem down to the script, but it’s working on one page and not on another, so I’m going to send this off to our IT support to solve.

Sponsor our Newsletter | Privacy Policy | Terms of Service