删除页脚下的空白区域

Use*_*019 0 css layout css3

如何删除页脚栏下的空白区域?我已经删除填充:页脚下15px,但它无法正常工作.

这是网站

CSS

#bottom-footer{ 
background: #909090;
text-transform: initial;
padding: 15px;
font-family: 'Arial', 'sans-serif';
color: #000000;
font-weight: 300;
}
#bottom-footer .site-info{
float: left;
font-size: 14px;
color: #000;
line-height: 1.8;
}
#bottom-footer .site-page{
float: right;
font-size: 14px;
line-height: 1.8;
color:#D00000;
}
#bottom-footer .copyright{
float: right;
padding-top:20px;
margin-left:600px;
}
#bottom-footer .logos{
float: left;
padding-top:20px;
margin-right:50px;
}
Run Code Online (Sandbox Code Playgroud)

web*_*kit 6

我假设你希望你的页脚粘在窗口的底部,除非内容高于窗口..我建议一些事情:

  1. 修复你的html,例如,你的所有内容都在你的标题标签内,这可能是一个错误.

  2. 为了让你的页脚正常工作,我会使用css计算方法为你的内容提供最小高度100%减去页眉+页脚的高度,因此(注意一些重要的css规则使这项工作):

html,body,#page,header {height:100%;}

#content {
  min-height: calc(100% - 285px); // 285 should be the height of your header + height of footer.
}
Run Code Online (Sandbox Code Playgroud)

**请注意,calc方法需要完全按照上面的方式编写(空格和全部)才能工作.. 浏览器支持链接

选项2

另一种方法是:

html,body,#page, header { height:100%;}

#page { position:relative;}
#content { padding-bottom:130px;} /* FOOTER HEIGHT */
footer { position:absolute; bottom:0;}
Run Code Online (Sandbox Code Playgroud)

如果您有任何疑问,请随意..