Forum Moderators: not2easy

Message Too Old, No Replies

IE adding white space to table rows

         

andrewsmd

7:01 pm on Oct 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have images that I am displaying in a table and IE keeps putting whitespace between table rows. Here is the html
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<table cellpadding="0" cellspacing="0">
<tr>
<td><img src="templateimages/body/template_r1_c1.jpg" alt="Two Rivers Logo" width="325" height="124" /></td>
<td><img src="templateimages/body/template_r1_c3.jpg" alt="connecting people" width="475" height="124" /></td>
</tr>
</table>
</td>
<tr>
<tr>
<td>
<table>
<tr>
<td><img src="templateimages/body/template_r2_c1.jpg" /></td>
</tr>
</table>
</td>
</tr>
</table>

And here is my css
table {
padding: 0;
border-collapse: collapse;
}
tr, th, td{
padding: 0;
border-collapse: collapse;
}
Anyone have an idea on how I can get the white space removed. Basically I need the images to be right next to each other to look like they are one solid background. Thanks.

swa66

8:10 pm on Oct 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd start with validating the code.
I spot some unclosed rows in there, maybe they aren;t intended to be there (but I get shudders from nested tables anyway)

Once that's done I 'd remember that normally images are inline elements and as such they sit on the baseline of text, allowing for descender characters like gypq.

To be sure which cell it is that's causing you trouble: give them each their own solid color background. That usually will tell you who's doing it.

andrewsmd

8:22 pm on Oct 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just moved to putting them in divs. Thanks,