I have an image that I want vertically aligned with some text. The image has no border, no spacing, and has been properly cropped. However, it aligns differently in IE and Firefox, and I cannot figure out why.
Alignment in IE:
Alignment in FF:
Notice how in FF, the X box is flush with the bottom of the text. The HTML I am using is:
<div id="Header">
<a href="#" onclick="return false;">Close</a>
<a href="#" onclick="return false;"><img src="App_Themes/Dark/images/close-button.gif" alt="Close" style="border-width:0px;" /></a>
</div>
And the relevant part of the stylesheet looks like:
#Header img
{
vertical-align: middle;
display: inline-block;
}
I've handled this in the past by making the image element a block element, but that only works when the image is the only element in the container. How can I fix this?