alt
alt

Reputation: 13907

Incredibly strange empty space appearing below element with image inside

Okay, so I'm designing this site. Here's the HTML markup of this simple element:

http://thegrantmag.com

It's the image box at the bottom of the screen, below the content area. It has a strip of white space below it. I'm usually pretty good at CSS troubleshooting, but this one has me. I've tried removing all the elements with the element inspector. As long as that image exists, there is a thin strip of white space below.

UPDATE: I tried removing the img and replacing with a div. It always creates a few extra pixels below the element, no matter what gets put in there!

Upvotes: 2

Views: 637

Answers (3)

sandeep
sandeep

Reputation: 92793

it's better if you define vertical-align:top in your image.

img{
 vertical-align:top;
}

Upvotes: 3

Anriëtte Myburgh
Anriëtte Myburgh

Reputation: 13517

Add display:block or float:left to the image's CSS.

See if that helps.

Upvotes: 0

peirix
peirix

Reputation: 37741

Set your image to display: block, that should fix it.

Upvotes: 3

Related Questions