Forum Moderators: mack

Message Too Old, No Replies

Html code: img in a table

I put an <img> in a <td> and can't eliminate the space around the image.

         

avenir

9:14 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



Hi everyone,

The following code displays images without any space between the images neither the ones beside each other nor the ones on top of each other; for the end result is that those three images make one big images. And it's fine because this is the goal.

<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="125" colspan="2"><img src="top.jpg" width="800" height="125"></td>
</tr>
<tr>
<td width="400" height="250"><img src="mid-l.jpg" width="400" height="250"></td>

Whereas this one shows space between the images and I compared it with the one above and I can't see where I go wrong. But the space I am really concerned about is the one that is between the two images on top of each other. Please, could someone help with that?

<table align="center" valign="top" width="650" border="2" cellspacing="0" cellpadding="0">
<tr>
<td height="84" colspan="0">
<img src="banner2.jpg" width="650" height="84" border="0">
</td>
</tr>
<tr>
<td height="5">
<img src="blackstripe.jpg" width="650" height="5" border="0">
</td>
</tr>
</table>

encyclo

9:48 pm on Oct 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The difference between the two is the carriage return after the
<td>
and
<img>
. Try removing all the cariage returns around the image:

<td height="84" colspan="0"><img src="banner2.jpg" width="650" height="84" border="0"></td>

White space shouldn't make a difference, but sometimes it does!

avenir

10:43 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



Hi encyclo,

Your are right, it made the trick. So, thank you very much, for I have been stocked on this for 24 hrs.

avenir

imstillatwork

7:06 pm on Nov 29, 2004 (gmt 0)

10+ Year Member



one of htmls wacky features that seems to be standard on any browser...