Link to home
Start Free TrialLog in
Avatar of tpiccirillo
tpiccirillo

asked on

Resized Images show as a line in Internet Explorer

I resize picture in my html.  They displayed fine prior to resizing.  Now theyare still fine in FF, Safari but in IE they show as a line.  Website is http://findlay.adavantagevalues.com  click on JR Costruction image and view images on subsequent page.

Below is the code where I resize the image
$imagesize = getimagesize ($descriptpict1, &$info);
if ($imagesize[0] > 0){
$newheight = 260 / $imagesize[0] * $imagesize[1]; 
$newwidth = 260;}
if ($descriptpict1 != NULL AND $descriptpict1 != ' ') {?>
<img src = "<?php echo $descriptpict1;?>" width ="<?php echo $newwidth;?>" height="<?php $newheight;?>">

Open in new window

Avatar of ziffgone
ziffgone
Flag of Canada image

Hi tpiccirillo,

Your "$newheight" variable is coming up null or something. The source code being outputed is this:

<img src = "http://findlay.advantagevalues.com/images/jr.jpg" width ="260" height="">

Firefox and other Gecko based browsers are ignoring the lack of a height value, but IE is treating » height="" « as "0". Fix you PHP for that and it should be OK.

You might have to debug and find out what values the "$imagesize[0]" and "$imagesize[1]" are giving.

Hope this helps.

Regards...
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial