正常显示我使用的主要内容两个列layout.One和一个侧边栏页脚在HTML

在HTML中我使用下面的代码

-----------

-----------

CSS文件包括以下代码

#content

{

padding-top:100px;

padding-bottom:50px;

width:1000px;

margin:0px auto;

}

#main-content

{

width:720px;

padding-top:250px;

padding-bottom:30px;

padding-right:20px;

position : absolute;

}

#sidebar

{

float:right;

width:270px;

padding-top:250px;

padding-bottom:30px;

}

#footer

{

background: url(../images/footer.jpg) repeat-x;

width:100%;

clear:both;

margin:auto;

}

页脚代码显示在页面的中间,可能是在侧边栏 可以看到here结束。页脚是黑色。

+1

你正在通过'javascript'编写'footer div' ..但是y ..在那个cuz中没有必要使用javascript,因此只需要写'静态内容'!把它带回到html! –

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐