I want to create a 3 x 3 table with no spaces in between the the rows AND columns. At the moment, I set cellspacing and cellpadding both to zero, but I still get some space between the rows. I posted a picture of what it looks like. See the space between the rows? How do I get rid of that?

Okay here's my code:
<!DOCTYPE html>
<html>
<body>
<table border="0" cellpadding="0" cellspacing="0" >
<tr >
<td><img src="bgimage.png" /></td>
<td><img src="bgimage.png" /></td>
<td><img src="bgimage.png" /></td>
</tr>
<tr >
<td><img src="bgimage.png" /></td>
<td><img src="bgimage.png" /></td>
<td><img src="bgimage.png" /></td>
</tr>
<tr >
<td><img src="bgimage.png" /></td>
<td><img src="bgimage.png" /></td>
<td><img src="bgimage.png" /></td>
</tr>
</table>
Any help in removing the space between the rows would be greatly appreciated.
you can try and add this to your CSS:
td {
line-height: 0;
}
should solve it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With