Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 页脚不会延伸到网站页面的底部_Html_Css_Footer - Fatal编程技术网

Html 页脚不会延伸到网站页面的底部

Html 页脚不会延伸到网站页面的底部,html,css,footer,Html,Css,Footer,可能重复: 这几天我一直在看书,但没有解决办法 我写了一个简单的旧html网站,它似乎不希望页脚扩展到页面底部。我一直在测试,但还是没有结果 下面是代码片段 <div id="footer"> <div id="footer_content"> <p> &copy; 2011 KRG Maintenance - All Rights Reserved - Contact Us</p>

可能重复:

这几天我一直在看书,但没有解决办法

我写了一个简单的旧html网站,它似乎不希望页脚扩展到页面底部。我一直在测试,但还是没有结果

下面是代码片段

<div id="footer">
        <div id="footer_content">
            <p> &copy; 2011 KRG Maintenance - All Rights Reserved - Contact Us</p>
        </div> <!--footer content ends-->
    </div> <!--footer ends-->
</body>
</html>

body{
    position:relative;
    background:#383d43 url(../images/body_bg.jpg) repeat-x;
    color:#000;
    font:62.5% Myriad Pro,Arial,sans-serif;
}
#footer{

    width: 100%;
    float: left;
    clear: both;
    height: 100%;
    background-color: #ffffff;
    background: #1e2329 url(../images/footer_bg.jpg) repeat-x;

}

#footer_content{

    margin: auto;
    width: 943px;
    padding: 17px 17px 0px 0px;
}

&复制;2011 KRG维护-保留所有权利-联系我们

身体{ 位置:相对位置; 背景:#383d43 url(../images/body_bg.jpg)repeat-x; 颜色:#000; 字体:62.5%Myriad Pro,Arial,无衬线; } #页脚{ 宽度:100%; 浮动:左; 明确:两者皆有; 身高:100%; 背景色:#ffffff; 背景:#1e2329 url(../images/footer_bg.jpg)repeat-x; } #页脚内容{ 保证金:自动; 宽度:943px; 填充:17px 17px 0px 0px; }
我是延伸到页面底部的页脚,但它只是在下方挂起空白。 我在这里真的很困惑,似乎其他解决方案都没有解决这个问题。
任何帮助都将不胜感激。

罗伯特·哈维的第一个链接看起来不错:确保身体本身足够大,可以让
做你想做的事情


所以,
height:100%
对于你的
身体来说应该可以帮你

谢谢罗伯特·哈维。我昨天试过了,但没有成功。因为某些原因,它现在起作用了:S“我昨天试过,但没有成功。因为某些原因,它现在起作用了”-哇,我们都知道这种感觉。
#footer{
display: block;
width: 100%;
float: left;
clear: both;
height: 100%;
background-color: #ffffff;
background: #1e2329 url(../images/footer_bg.jpg) repeat-x;
}