Table cell with image rendered too large in IE

css, html, html-table, image, internet-explorer

Solution

You can set the images to display as block elements and this should remove the space.

<IMG style="display: block; width: 24px; height: 68px; margin:0px; padding:0px; border:none" src="Image24x68.png"> 

Problem

I have the following simple table to reproduce the issue: ``` <TABLE> <TR> <TD style="border: black solid 1px; width:24px; height:68px; margin:0px; padding:0px" > <IMG style="width: 24px; height: 68px; margin:0px; padding:0px; border:none" src="Image24x68.png"> </TD> </TR> </TABLE> ``` The image is actually 24x86 pixels large. The border is just to mark the cell's boundaries. There is no css file assigned to the document. I want the cell to be exactly as large as the image. The problem is: the table cell gets always rendered a few pixels too high in any IE version (6, 7, 8) while it works fine in Firefox and other browsers. Is there any solution / workaround for this?

Original source