Jump to content

My Table Has Space Inbetween <td>'s


badboy708
 Share

Recommended Posts

try it with cellpadding="0", seel below:<html><head> </head><body><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><img src="http://fliers.greenbranders.com/images/flier-lttopcorner.gif"/></td><td width="300"><div style="background-image: url(http://fliers.greenbranders.com/images/flier-bckground.gif); background-repeat: repeat-x; height: 12px;"></div></td><td><img src="http://fliers.greenbranders.com/images/flier-rttopcorner.gif"/></td></tr><tr><td><img src="http://fliers.greenbranders.com/images/flier-ltbotcorner.gif"/></td><td><div style="background-image: url(http://fliers.greenbranders.com/images/flier-bckground.gif); background-repeat: repeat-x; height: 12px;"></div></td><td></td></tr></tbody></table></body></html>

Link to comment
Share on other sites

I see differences between IE7/8 and FF. It might be helpful to declare a DTD, a strict one for best results, and see if it a least irons out any of the display inconsistencies between browsers.edit: oh yeah, might as well validate it after you throw in the DTD.

Edited by thescientist
Link to comment
Share on other sites

I see differences between IE7/8 and FF. It might be helpful to declare a DTD, a strict one for best results, and see if it a least irons out any of the display inconsistencies between browsers.edit: oh yeah, might as well validate it after you throw in the DTD.
Ok I added a DTD and validated it... still same issues.
Link to comment
Share on other sites

it's has nothing to do with setting DTD, IE allows for text entered in it's cells, it will use the font-size (default 16px, i think) height, and so produce the spacing you are getting. To fix this, set the font-size, and also line-height to 0px to specific table rows.see fix below:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title> </head><body><table cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0px; line-height:0px;"><td><img src="http://fliers.greenbranders.com/images/flier-lttopcorner.gif" alt=""/></td><td style="width:300px;"><div style="background-image: url(http://fliers.greenbranders.com/images/flier-bckground.gif); background-repeat: repeat-x; height: 12px; font-size:0px;"></div></td><td><img src="http://fliers.greenbranders.com/images/flier-rttopcorner.gif" alt=""/></td></tr><tr style="font-size:0px; line-height:0px;"><td><img src="http://fliers.greenbranders.com/images/flier-ltbotcorner.gif" alt=""/></td><td><div style="background-image: url(http://fliers.greenbranders.com/images/flier-bckground.gif); background-repeat: repeat-x; height: 12px; font-size:0px;"></div></td><td><img src="http://fliers.greenbranders.com/images/flier-rtbotcorner.gif" alt=""/></td></tr></tbody></table></body></html>

Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...