Topic: Mysterious white gap under image!

HI

Mysterious white gap under image!

Seam's ok on pc (ie7 screenshot from total validator) but on all my mac browsers i see the gap between border and bottom of image. 

http://www.oneorangemonkey.com/Picture1.jpg

Any ideas what is causing this and what i can do to kill the evil white space!


Thanks...
monkey

Last edited by oneorangemonkey (2007-08-07 06:23:02)

Re: Mysterious white gap under image!

Image display as inline elements and can have this annoying gap at the bottom.  Try adding a rule to your css.

img display:block;

Re: Mysterious white gap under image!

sydneyfx wrote:

Image display as inline elements and can have this annoying gap at the bottom.  Try adding a rule to your css.

img display:block;

The display:block; works, but you could also just write the image w/ container in a single line.

Example:

Use this:

<div class="image_container"><img src="your/path/to/image.jpg" /></div>

Instead of this:
<div class="image_container">
    <img src="your/path/to/image.jpg" />
</div>

Re: Mysterious white gap under image!

Ahh - Problem solved - i had the images set to block in my reset css and totally forgot to include it!

So i thought it was alredy set to block and was still getting white space, but now i realize i am just a total tube!@

Thanks for the quick responses though guys!