5

Possible Duplicate:
White space at bottom of anchor tag

Check out this sample page here.. http://denise.brixwork.com/

For some odd reason, under that pic of that family, there's a gap before the grey border (5px #333) div that contains the image. I removed all margins, paddings etc. and it still wont' disappear. :(

Short of setting a fixed height on the #index_content div, which i don't want in case the image has to be re-sized later (which means double the work for me), how can I remove that gap while leaving it elastic?

My HTML Code:

<div id="index_content_container">
    <div id="index_content">
        <img src="http://denise.brixwork.com/images/index_photo.jpg" alt="Real Whistler Living - Real Estate for the Next Generation" />
    </div>
    <div class="clear"></div>
</div>

The CSS:

/* INDEX PAGE SPECIAL CSS */
#index_content_container {
    position: relative;
    width: 970px;
    border: 5px solid #e1bb14;
    left: -20px;
    display: block;
    float: left;
    padding: 0px;
    margin: 0px;
}

#index_content {
    position: relative;
    width: 960px;
    border: 5px solid #333;
    float: left;
    display: block;
    padding: 0px;
    margin: 0px;
}

#index_content img {
    padding: 0px;
    border: none;
    margin: 0px;
    clear: none;
}
Community
  • 1
  • 1
jeffkee
  • 5,106
  • 12
  • 44
  • 76

2 Answers2

5

Try this:

#index_content img{
padding: 0px;
border: none !important;
margin: 0px;
clear: none;
display: block;
}
j08691
  • 204,283
  • 31
  • 260
  • 272
Adam Flatau
  • 168
  • 10
4

You only need display: block in your img tag, nothing else =)

Asif
  • 4,980
  • 8
  • 38
  • 53
leopic
  • 2,958
  • 2
  • 27
  • 42