在图像下出现的神秘缺口 [英] Mysterious gap under image appearing

查看:213
本文介绍了在图像下出现的神秘缺口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

锚定标记底部的空格

在这里查看这个示例页面。
http://denise.brixwork.com/

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

由于一些奇怪的原因,在那个家庭的图片下,在包含图片的灰色边框(5px#333)div之前有一个缺口。我删除所有的边距,paddings等,它仍然不会消失。 (

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. :(

在#index_content div上设置固定高度的问题,我不想在以后必须重新调整大小的情况下

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?

我的HTML代码:

<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>

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;
}


推荐答案

>

Try this:

#index_content img{
padding: 0px;
border: none !important;
margin: 0px;
clear: none;
display: block;
}

这篇关于在图像下出现的神秘缺口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆