GeoffC said:
Forgot to mention that I even set the line height explicitly to the
image height in pixels but even that made no difference.
The height of line boxes is not determined by the line-height
property.
The line-height property of the parent determines the minimum height
of the line box.
The actual height is determined by the heights of the various inline
boxes that make up the line box.
Then you have the fact that the image sits on the text baseline and
thus the actual height of the line box is from the top of the image or
the font (even when no text is actually present) whichever is taller
to the bottom of the font.
So you would need to:
* set the line-height of the parent element to the height of the image
(or less but safer to make it equal);
* and set the font-size to the height of the image (or less);
* and set the vertical-align property of the images themselves as
outlined in Spartanicus's post.
Or make the images block elements, in which case there will be no line
boxes as there are no inline elements, and thus no problem.
Problem doesn't occur in Opera or IE 6.
Opera and IE don't apply this part of CSS 2.1 and CSS 2 was rather
more vague on this topic.
Steve