HTML页脚问题 [英] HTML footer problem

查看:99
本文介绍了HTML页脚问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建一个位于网站底部的页脚div,而不管中间有多少信息?

目前我有div这取决于我在身体内有多少内容。


另见:



如何让页脚停留在网页底部?



解决方案

我绝不是css专家,但这对我来说适用于所有主流浏览器:

  .d_footer 
{
position:fixed;
bottom:0px;
背景颜色:#336699;
宽度:100%;
text-align:center;
padding-top:5px;
padding-bottom:5px;
color:#ffffff;
}


Is it possible to create a footer div that sits at the bottom of a site regardless of how much information is present in the middle?

Currently the div I have is positioned depending on how much content i have in the body.

See also:

How do you get the footer to stay at the bottom of a Web page?

解决方案

I am by no means a css expert, but this works for me across the major browsers:

.d_footer
{
    position:fixed;
    bottom:0px;
    background-color: #336699;
    width:100%;
    text-align:center;
    padding-top:5px;
    padding-bottom:5px;
    color:#ffffff;
}

这篇关于HTML页脚问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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