Click to See Complete Forum and Search --> : images in a table - i want the two images to touch


podunk
03-20-2003, 11:26 AM
is there a way i can eliminate all the space between two rows in a table? i want the image in the top row to touch the image in the row below it. i have cell padding and cell spacing at zero and the border at zero. what else do i need to do?

web-eagle
03-20-2003, 11:54 AM
You might also want to look at the height and width parameters of each cell to make sure they match your image size. It’ll look something like
<td width="100" height="120">
This shouldn’t be necessary, but sometimes it is.

If it’s not critical that the images be in separate cells you might try putting them in the same cell with a line break <br> between them.

Nedals
03-20-2003, 11:55 AM
You may be getting small spaces between your images. The 'trick' to solve this is to make sure that your </td> is on the same line as your image tag.
<tr>
<td>
<img src="image.gif">
</td>
</tr>
....gaps

<tr>
<td>
<img src="image.gif"></td>
</tr>
.... no gaps

gil davis
03-20-2003, 12:19 PM
There is also a border on the image that you can set to zero.

nkaisare
03-20-2003, 12:24 PM
http://devedge.netscape.com/viewsource/2002/img-table/

podunk
03-20-2003, 04:27 PM
Originally posted by nedals
You may be getting small spaces between your images. The 'trick' to solve this is to make sure that your </td> is on the same line as your image tag.
<tr>
<td>
<img src="image.gif">
</td>
</tr>
....gaps

<tr>
<td>
<img src="image.gif"></td>
</tr>
.... no gaps



This was my problem!

Thanks alot, my site looks awesome now :o)

Beauchamp
03-21-2003, 12:48 PM
Hi

You can also use <td valign=bottom> for the top row and valign=top for the bottom row.

jdavia
03-22-2003, 04:04 PM
Originally posted by podunk
is there a way i can eliminate all the space between two rows in a table? i want the image in the top row to touch the image in the row below it. i have cell padding and cell spacing at zero and the border at zero. what else do i need to do?
Here is a very simple trick that I use when I cut up an image.
Do not use a table to set the images.
Instead use this code to set the images and insert it in a table if needed.
Use no spaces, add a <BR> for a new row. You can include the image sizes and I think the "alt"

<TABLE border=0>
<TR>
<TD>
<IMG SRC="one.gif"HSPACE=0"VSPACE=0"BORDER="0">
<IMG SRC="rwo.gif"HSPACE=0VSPACE=0"BORDER="0"><BR>
<IMG SRC="three.gif"HSPACE=0VSPACE=0"BORDER="0">
<IMG SRC="four.gif"HSPACE=0VSPACE=0"BORDER="0"><BR>
<IMG SRC="five.gif"HSPACE=0VSPACE=0"BORDER="0">
<IMG SRC="six.gif"HSPACE=0VSPACE=0"BORDER="0">
</TD>
</TR>
</TABLE>

Nedals
03-22-2003, 06:55 PM
jdavia,
If you use the code exactly as posted you will get spaces around your images. (I copied and pasted your code and tried it!). The trick is to NEVER follow an image tag with a 'return'.

<TABLE border=0>
<TR>
<TD>
<IMG SRC="........"><IMG SRC="......."><BR>
<IMG SRC="........"><IMG SRC="......."><BR>
<IMG SRC="........"><IMG SRC="......."></TD>
</TR>
</TABLE>

Re-layout like this and you will have no spaces.

jdavia
03-22-2003, 07:46 PM
Originally posted by nedals
jdavia,
If you use the code exactly as posted you will get spaces around your images. (I copied and pasted your code and tried it!). The trick is to NEVER follow an image tag with a 'return'.

You are right. And I mentioned that. My mistake was to make it look good in the post that I did make returns.

I think the Hspace, Vspace , and no border should still be included.
Thanks for being sharp

khaki
03-23-2003, 01:51 PM
Hi Guys...

All this chitter-chatter about positioning images with.... gasp! ...tables (wink).

<div>s will put 'em exactly where you want 'em. Butt-up, overlapping, you name it.

There really is no need to use tables for positioning images.

<div> positioning does it with less code and with greater control and accuracy.
(that's my 2 cents)

big spender...
k