这是在我添加页脚文本之前。页脚图像恰好靠在页面底部。



这是在我添加页脚文本之后。

我在页面底部找不到导致神秘的额外差距的问题。忽略黑色边框-我用它来检查页脚文本图像的边距。

CSS:

* {
    margin: 0;
    padding:0;
}



body {
    background-image: url('images/BG-W1.png');
}
#container{
    max-width:1000px;
    margin: 0 auto;
    position: relative;
    padding: 0 auto;
    height: 790px;
    border: 2px solid blue;

}

#footerBg {
    position: relative;
    bottom:-63px;
    left:-50px;
}

#footerBg img {
    display: block;
}

#footertex {
    position: relative;
    top:-110px;

    border:2px solid black;

}
footer {
    height: 50px;
}

#footertex img {
    display: block;
}


HTML:

<footer>
            <figure id="footerBg">
                <img src="images/BG_F_S3.png" alt="Footer Background" width="" height="" />

            </figure>

        <<figure id="footertex">
                    <img src="images/ft1.png" usemap="#green" border="0" />

                    <map name="green">

                    <area shape="rect" coords="513,56,625,106" href="http://www.google.com" />
                    <area shape="rect" coords="725,58,874,108" href="http://www.google.com" />

                    </map>
        </figure>

        </footer>

最佳答案

您可以发布HTML和CSS代码吗?想到的一个快速解决方法是div#footer { box-sizing: border-box; },但是显示您已经拥有的内容将有望为您带来更好的答案。

10-05 20:44
查看更多