移动容器移动页脚

时间:2014-11-16 20:12:30

标签: html css

我的问题是,当我尝试在页脚内部制作容器并在页脚和容器之间添加边距时,由于某种原因,这个边距介于页脚和我网站的主体之间。

以下是我设置页脚和边距的方法:

<div id="footer">


            <div id="footer_content1">      
            </div>  
        </div>

这是页脚的CSS

#footer {
    background-color: white;
    width: 940px;
    height:100px;
    border-bottom: 2px solid black;
    border-right: 2px solid black;  
    border-left: 2px solid black;
    }

以下是容器的CSS:

#footer_content1 {
    background-color: blue;
    height: 50px;
    width: 500px;
    margin-top: 10px;
    }

1 个答案:

答案 0 :(得分:1)

请先检查一下你的代码:在css中它说&#34;#footer_content1&#34;这与html id&#34; footer_container1&#34;

不相等
相关问题