Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with small gaps/lines between photos & background images in IE 2

Status
Not open for further replies.

Rexolio

Technical User
Aug 29, 2001
230
For some reason (and I haven't noticed this before upgrading several months ago to IE 5.5) most times when I create a web page with an image that is broken into 2 images, split over 2 table cells there is a small gap or space between the 2 when I first pull it up in Internet Explorer. This usually goes away after I either minimize or refresh OR after I've been to the page a couple of times and its cached. For example:

<table>
<tr>
<td>
<img src=&quot;images/pic1.jpg&quot; border=&quot;0&quot;>
</td>
</tr>
<tr>
<td>
<img src=&quot;images/pic2.jpg&quot; border=&quot;0&quot;>
</td>
</tr>
</table>

Where pic1.jpg is a person's head and pic2.jpg is there body. There will be a small gap. Of course I didn't add any table or cell properties to this example script, but I'm sure you get the picture.

Anyone else experiencing this problem? I haven't upgraded to 6.0 yet and really don't want to as I've heard there are bugs with it.

Thanks for your help!

Rexolio
 
Remove the line break between the image and the closing td tag.

<img src=&quot;images/pic1.jpg&quot; border=&quot;0&quot;></td>

Cheers,

Tom
 
.. and the opening one. Put it on one line.

<td><img src=&quot;images/pic1.jpg&quot; border=&quot;0&quot;></td>

Tom
 
I don't see how that would do this, but I'll try it. However, it also does the same thing on pages where I've done this:

<table>
<tr>
<td>
<img src=&quot;images/pic1.jpg&quot; border=&quot;0&quot;><br>
<img src=&quot;images/pic2.jpg&quot; border=&quot;0&quot;>
</td>
</tr>
</table>

Same solution there? But everything on the same line?:

<td><img src=&quot;images/pic1.jpg&quot; border=&quot;0&quot;><br><img src=&quot;images/pic2.jpg&quot; border=&quot;0&quot;></td>
 
The problem is the line breaks after the <td> and before the </td>. They are turned into spaces, which is where the gaps come from. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Ok here is the solution to your problem:

<table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td><img src=&quot;pic1&quot; border=&quot;no&quot;></td>
<td><img src=&quot;pic2&quot; border=&quot;no&quot;></td>
</tr>
</table>

BobbaFet Everyone has a right to my opinion.
E-mail me at cwcon@programmer.net
 
Not to be a complete standards nazi ;-), but I believe it ought to be:
<img src=&quot;pic1&quot; border=&quot;0&quot;>

Most browsers seem to interpret the non-numeric value, though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top