> The following HTML works as expected in IE6 and IE7, but in Firefox,
> there is extra space below the image. I tried setting margin and
> padding to 0 for different elements but still cannot get rid of it. Any
> idea what causes the space?
Inline images are like text - there is space below it, to make room
for the descenders of g,j,p,q and y.
Try this:
td img{display:block;}

Signature
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
dorayme - 30 Oct 2006 22:11 GMT
> Inline images are like text - there is space below it, to make room
> for the descenders of g,j,p,q and y.
>
> Try this:
> td img{display:block;}
A nice bit of information, Els. Useful when making and styling
captions.

Signature
dorayme
Stanley - 30 Oct 2006 22:34 GMT
This fixed it! Thanks, Els!
> > The following HTML works as expected in IE6 and IE7, but in Firefox,
> > there is extra space below the image. I tried setting margin and
[quoted text clipped - 10 lines]
> Els http://locusmeus.com/
> accessible web design: http://locusoptimus.com/
rh - 31 Oct 2006 02:06 GMT
<snip>
> Inline images are like text - there is space below it, to make room
> for the descenders of g,j,p,q and y.
>
> Try this:
> td img{display:block;}
you can also use:
vertical-align: bottom;
which maintains the inline display for the image
Rich
Ben C - 31 Oct 2006 08:41 GMT
><snip>
>> Inline images are like text - there is space below it, to make room
[quoted text clipped - 8 lines]
>
> which maintains the inline display for the image
That still leaves room for descenders though.
Els - 31 Oct 2006 15:15 GMT
>><snip>
>>> Inline images are like text - there is space below it, to make room
[quoted text clipped - 10 lines]
>
> That still leaves room for descenders though.
Only if you set it on the td, not when set on the image itself.
But depending on the height of the image, the value for line-height,
and whether there is more text and the height of that text, it may
leave a space *above* the image. (room for ascenders :-) )

Signature
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
rh - 31 Oct 2006 20:27 GMT
<snip>
> > That still leaves room for descenders though.
>
> Only if you set it on the td, not when set on the image itself.
> But depending on the height of the image, the value for line-height,
> and whether there is more text and the height of that text, it may
> leave a space *above* the image. (room for ascenders :-) )
I should've been more specific.
The op had one image (no text) in a td cell.
A simple way to remove the space below the image is to use vertical-align:
bottom;
td img {
vertical-align: bottom;
}
Rich
: The following HTML works as expected in IE6 and IE7, but in Firefox,
: there is extra space below the image. I tried setting margin and
[quoted text clipped - 18 lines]
: </body>
: </html>
It's the cellspacing=4 that causes it.
Sid