Forum Moderators: open
If I use a HTML 4 strict doctype:
- If there is a newline before the ending </td> in my code, IE put some extra space after the image!
- Firefox put some padding in the cell, even with cellpadding="0". The only way I found to remove this padding is by adding "line-height:0px;" to the cell!
Can someone please tell me what is wrong or missing in my code? I'm pretty sure "line-height:0px;" is an ugly hack and not using newlines in my code is frustrating!
Here's my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body><table cellspacing="0" cellpadding="0">
<tr>
<td style="background-color:Blue;line-height:0px;">
<img src="a.gif" /></td> <!-- IE: No newline here! -->
</tr>
<tr>
<td style="background-color:Lime;">
abcdefg
</td>
</tr>
</table></body>
</html>