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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Annoying unwanted cell space

Status
Not open for further replies.

ssidetv

Technical User
Aug 30, 2001
57
GB
I have placed a picture in a cell which has a colored background. I want the picture to sit tight against the cell border, yet I always seem to get a tiny line of the background color leaking at the edge.

Please see for an example. Note the right edge of the picture, which has a thin line of yellow down the side. I would like the edge of the picture to form the adge of the cell.

The cell pad and cell space boxes in Table properties are empty...not 0.

Thanks,

Nick
 
Hi Nick,

Try putting hspace="0" in the image. It will get rid of the gap but may cause other layout problems. Why not just use two columns. Have you looked at the site in Netscape?

Cheers,

Tom
 
Tom, thanks for your advice. The hspace=0 does do the trick, as does the same for vertical space. In Netscape I notice that the picture extends beyond the border of the cell, even though in layout it actually resides totally inside the cell. Weird.
As for using columns, I tried that but got an annoying white line between the cells. Would hspace=0 or something similar have avoided that?

Thanks so much for your guidance,

Nick
 
Hi Nick,

I've just had a look at the site and it looks fine now. That white line you got was probably because you hadn't specified cellpadding or cellspacing and the bgcolor wasn't specified in the background of the table. I think cellpadding and cellspacing defaults to 2 if you do not specify.

Hope this is of some use.

Tom
 
Hello Nick!

Can't see your site - "Can't find server"

So I'll try to summarize all possible problems:

1) table must have cellpadding="0" and cellspacing="0";

2) image should have vspace="0" and hspace="0";

3) there should not be anything else in the cell - DW may left   inside that may cause the problem;

4) do not use HTML syntax like this:
<td>
<img ...>
</td>
try to put it in one line - <td><img ...></td>.


That's it.

Good Luck!
 
Thank you Eugene, good advice.

Yeah, our host tripped a security procedure in the small hours of this morning and knocked our dns off line. Back up at To see how I am doing it, I would be grateful if you would check I have put the picture in its own cell, and the text in another, with 0 settings for cell pad and cell space, plus hspace and vspace=0 on the pic. Also, the image cell information is all on one line, as you suggested.
I also set the height of both cells to the height of the picture in the hope of achieving symmetry between the two, but in IE6 the text cell is taller than the image cell. In Nutscrape (NS 4.7) the two align nicely. But then a little white line appears between the two, which does not happen in IE. Am I missing something?

As with all the excellent advisers on this site, I am grateful for your interest and wisdom.

Nick
 
You need to make sure that border=&quot;0&quot; is in your tables also. This is missing from your table and that is what is creating the white line in netscape.
 
MrGrey, I thank you. It solved the problem.

Thanks and best wishes to all,

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top