Probably padding related, maybe it is the div containing the image? Could probably help if you posted a link, if possible.
A:
tomzx
2009-07-03 11:49:10
+3
A:
It'll likely be the vertical alignment - check the computed style to see what it currently is for the images, then try adding this to your stylesheet:
img { vertical-align: text-bottom; }
See That mysterious gap under images and What is Vertical Align for some examples of what's happening.
insin
2009-07-03 11:50:19
Thanks for the links and great answer :)
Antony Carthy
2009-07-03 12:21:15
+5
A:
By default, images align their bottom edges with the baseline of the text. That space you're seeing is the space below the baseline, used by decenders like q, p, y, etc. (The fact that you have no text is irrelevant - space for them is still reserved.)
You can get rid of it like this:
img { /* Or a suitable class, etc. */
vertical-align: bottom;
}
RichieHindle
2009-07-03 11:50:55
thanks for letting me know the cause of this - I never really understood baseline etc before.
Antony Carthy
2009-07-03 12:20:36
A:
Using vertical-align bottom is one solution that works.
Since you don't appear to be using images inline with text though, the approach I'd take is to make the images block-level elements:
img {
display: block;
}
Sam DeFabbia-Kane
2009-07-04 04:16:42