I have a webpage that contains a picture inside a table cell. But, in the table cell there is also an additional 5px on the bottom.
I simplified the code to the max:
<!DOCTYPE html>
<html>
<head>
<title>Random page</title>
</head>
<body>
<table>
<tr>
<td style="border: 1px solid black">
<img style="border: 1px solid red" src="picture.png" />
</td>
</tr>
</table>
</body>
</html>
The result, in Firefox 25 and Internet Explorer 10:
As you can notice there is blank space in the bottom.
I know this could be caused by whitespaces, so I removed all of them between tags. No effect.
The weirdest part is, if I remove the DOCTYPE
specification, or replace it with HTML or XHTML Transitional (Strict does not work), it starts to work.
Is this a weird quirk of HTML/XHTML Strict or what? Can it be worked around and how?