In the strict DTD, since img tags are natively display: inline (like span or a tags), the logic (which I never really fully understood) goes that, like these other tags, there must be allotted room for for letters that go below the line, like p, g, q, j, some others perhaps, depending upon the font.
Often this is dealt with by making the image(s) in question display: block. But this will introduce a line break. So then the image is often floated left or right to compensate for that (ex - float: left;).
I've also found that using instead of display: block; and a float, you can often get by setting the img tags' vertical align, ex:
Code:
img {
vertical-align: top;
}
Valid values are top, middle, or bottom. See if one of those works for you. I think I've had the most success with top, but it's been a while since this has actually come up for me. If none of those work, try:
Code:
img {
display: block;
float: left;
}
But that may adversely affect other images on the page, forcing you to tailor it to a specific image or images that require it.
There is also:
Code:
img {
display: inline-block;
}
This may or may not be all that cross browser.
Though I never tried it, this may work:
Code:
img {
font-size: 1px;
}
Bookmarks