0

我知道关于粘性页脚还有其他几个问题,但似乎没有一个可以帮助我找到解决问题的方法。这是有问题的模板:

http://blog.campquiet.com/stack/

基本上我希望带有透明侧栏的背景延伸到浏览器窗口的底部。页脚(版权信息)也应始终位于屏幕底部,即使没有足够的内容将其推到那么远)。

有什么建议么??

更新 也许我没有我需要的那么清楚。基本上我正在尝试完成这里看到的内容:hxxp://www.cssstickyfooter.com/

我无法在我的模板中使用它。

4

2 回答 2

1

您需要将主体和外部容器设置为 100% 高度。这个答案可以帮助你:CSS 100% height with padding/margin

于 2010-07-11T22:26:01.903 回答
0

我不确定我是否理解您的要求,但是要始终将页脚保持在底部,也许可以尝试这样的事情

#footer{
    position: fixed;
    bottom: 0; /* Keeps the footer glued to the bottom of the page */
    z-index: 9999; /* Keeps the footer on top of all other elements */
}

对于背景,尝试将 CSS 应用于body标签?

body{
    background: url(assets/images/bg_clouds.jpg) fixed 0 0;
}

您可以为背景应用额外的设置(如位置和重复),使其看起来像现在一样。无论如何,如果这不能回答您的问题,请帮助我更详细地解释您的问题。

希望有帮助。

更新

我玩过 Firebug 来编辑你的 CSS。我想如果你摆脱了背景 csshtml, body {}并将其添加到你的body {}

body {
   background: url("assets/images/bg_clouds.jpg") repeat-x fixed 0 0 #F0F4F7;
}

...即使您滚动,它也会保持背景静止。它会一直在那里。确保你有fixed而不是scroll

于 2010-07-11T23:08:16.673 回答