• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

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

0
tpiccirillo
Asked:
tpiccirillo
1 Solution
 
ziffgoneCommented:
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...
0
 
Ray PaseurCommented:
Try putting the "echo" statement into this thing:

height="<?php $newheight;?>">

See if that helps,

~Ray
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now