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

Netscape puts gaps between my table rows

Status
Not open for further replies.

LEICJDN1

Technical User
Nov 27, 2002
201
GB
Hi,

Have a page here:


that uses a table to display a graphic by having sections of the picture in each cell.

Works fine in IE, but NS 7.0 puts a gap between table rows spoiling the image.

Cellpadding and Cellspacing are both 0. The relevant DIV in the CSS file has some left-padding but padding-top and padding-bottom are both also 0.

An ideas why the gaps appear and how I can remove / prevent them?

Cheers.
 
Try removing the spaces between the
Code:
</tr> <tr>
tags. It might not make a difference, but that's the first thing I'd try.

-Ron

-We all play from the same deck of cards, it's how we play the hand we are dealt which makes us who we are.
 
Good suggestion Darkshadeau, and one I should have thought of myself really, but no difference.

Incidentally, the page is XHTML strict valid.

Any other ideas?
 
Strange stuff going on here. I viewed with Mozilla and saw the 'gaps' in the rows. I looked at it Mozilla's DOM inspector and its computing your styles right: no borders or padding, cellspacing and cellpadding are 0. At one point I clicked on one of the table cells and it brought up a new window with no image in it. I went back to the page you posted and none of the images are showing up on any of your pages. Strange stuff going on, unless you were doing something to the site while I was working on it. I can however, right-click where an image is and do &quot;view image&quot; and see it.

BTW, you borrowed a little heavily from didn't you?

Kevin
A+, Network+, MCP
 
Well..

I have found a solution, but you're not going to like it (i.e. I have no idea why it's really happening ;o)...

If you remove the DTD declaration from your code (lines 1-3), then all works fine.

I've looked through the DTD, and can find no reason as to why the problem is happening...

Hope this helps!

Dan
 
Kevin,

Yes, Eric Meyer's site was the inspiration! However the design is evolving as I add bits. He will of course be credited appropriately.

When I click the cells I get the image loading fine with no problems - can't fathom why you didn't.

I oculd remove the DTD decleration if I have to, but it is all a bit odd don't you think?

Unfortunately the nature of the site means having gaps between rows kind of spoils it really.

DOes anyone know if this is a known issue?

Thanks for your advice,

JDN
 
Kevin,

Thanks, those links look useful.

It appears a reasonable work around is to set display to block in the css code for td img, or to fiddle with vertical-align, text height and font height.

Will hopefully be able to solve the problem.

Cheers.

JDN
 
Update:

Setting td imgage {display:block;} works a treat.

Not sure what would happen in there was more than one image in a table cell though.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top