Page 1 of 1

Random image code causing problems only in IE

Posted: Tue Nov 08, 2005 5:09 am
by Francis8
feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


Hello

I am new to PHP, but am learning all the time and have found this board useful, however this is my first post.

As part of my development i am trying to incorporate some PHP into small site for a client as part of my own development. I have achieved the same results with javascript but want to move away from client side.

My current problem is inserting a php include to produce a random image. My problem is that in IE, and only in IE, a small gap appears below the image and the border of the cell.  I am inserting the code into a nested table that has some style attributes attatched but i dont think this is the problem. Plus i have tried some other open source random image php scripts with the same results, which has lead me to believe that is is a browser issue.

Does anyone know if this is a common problem as i have searched the forums but could not get any info on this particular subject.

My html is included in case i have missed something simple!!!??? Plus a screen shot of the cell in question so you can see what i am talikng about. It is the 5 pixel(approx) gap between the bottom of the image and the yellow cell border.

I dont get this gap when i use javascript for the same function?

I hope someone can point me in the right direction as i am enjoying my development with PHP and hope to get over this hurdle soon.

Thanks in advance for your help.

Francis

Code: Select all

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="leftcol">
        <tr> 
          <td width="137" class="coltitle">services</td>
          <td width="13"><img src="../fitness/images/tableright1.gif" width="17" height="17"></td>
        </tr>
        <tr> 
          <td colspan="2" class="picpad"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td valign="baseline" class="picture"> 
                  <?php include "scripts/random_image.php";?>
                </td>
              </tr>
            </table>

Image


feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Tue Nov 08, 2005 5:19 am
by onion2k
I suspect there's a rogue carriage return in the HTML immediately after the <img> tag..

Posted: Fri Nov 25, 2005 9:17 am
by php3ch0
Can we see the code for:

scripts/random_image.php