IE8 Table TD tag and font-size - bug or standard compliant?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Not sure if this is the right spot to post this question or not.
Please let me know.

I've searched high and low for some info about this, but I can't find

Testing in IE8, I've come across a problem where HTML such as the
following does not work as expected:

        <table border="0" width="100%" cellspacing="0" cellpadding="0">
                <td background="1x1.gif"><img src="1x1.gif" border="0"></td>

1x1.gif is, as the filename suggests, a 1 pixel gif image.  I'd expect
that the TR row would be 1 pixel in height, for the width of the
browser window, but it is not.  The only way I can make this row 1
pixel in height is to specify a font-size of 1px or smaller in a style
attribute of the TD element (or remove the img tag within the TD).

Both firefox (latest) and IE7 work as I'd expect them to.  Do you
think this is a defect in IE8 or just a part of IE8's new standards
compliance?  If I switch to a mode other than Standard through the IE8
developer tool (quirks mode, for example), things are fine.

Re: IE8 Table TD tag and font-size - bug or standard compliant?

Quoted text here. Click to load it

Are you sure you're getting Firefox in strict mode? I would expect the
td to be higher than 1px since it contains an inline image which is
aligned to the baseline of the td.

There should therefore be a gap below the image equal to the font
descent of the td's font.

Set display: block (or vertical-align: bottom) on the img and it should
work as expected in strict mode in all conforming browsers.

Site Timeline