页脚没有停留在页面底部

发布于 2024-11-23 23:48:28 字数 300 浏览 0 评论 0原文

我从 themeforest 获取了一个模板并对其进行了修改。一切正常,除了在某些页面上,页脚没有粘在页面底部。我把CSS弄乱了一点,但没能坚持下来。我仍在学习 html/css,因此需要一些帮助来检查它,以确保我的 html 中没有任何错误。我还没有从初始模板中修改CSS。我做了一些,但在帖子之前将其恢复,因为它们试图让页脚粘住。

这是该网站的链接> http://capitalcrestoration.com/build/

i grabbed a template from themeforest and modded it. all works well, except, on some pages, the footer isn't sticking at the bottom of the page. i've messed w/ the css a bit, but haven't been able to get it stick. i'm still learning html/css so wanted some help in reviewing it to make sure i don't have any mistakes in my html. i haven't modded the css from the initial template. i did some, but reverted them before the post, as they were attempts at getting the footer to stick.

here is a link to the site > http://capitalcrestoration.com/build/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不回头走下去 2024-11-30 23:48:28

我认为从你的问题来看,你是在问如何使页脚始终出现在窗口底部。

为此,您只需更改 #subfooter-wrapper 的 CSS 规则:

#subfooter-wrapper {
    background: url("images/sub_footer_bg.jpg") repeat-x scroll 0 0 transparent;
    width: 100%;
    position: fixed;
    bottom: 0;
    z-index: 1000;
}

I think from your question you are asking how to make the footer appear at the bottom of the window at all times.

To do this you just need to change the CSS rule for #subfooter-wrapper:

#subfooter-wrapper {
    background: url("images/sub_footer_bg.jpg") repeat-x scroll 0 0 transparent;
    width: 100%;
    position: fixed;
    bottom: 0;
    z-index: 1000;
}
注定孤独终老 2024-11-30 23:48:28

您可以尝试一下CSSStickyFooter

您需要对 CSS 进行一些操作,将页脚元素定位在窗口底部。否则,它只是一个直接位于其同级元素下方的块元素。

You could try giving CSSStickyFooter a shot.

You need to do something with your CSS to position the footer element at the bottom of the window. Otherwise it's just a block element that will be directly under it's sibling.

伊面 2024-11-30 23:48:28

尝试将 div id="subfooter-wrapper" 放置在包装器的结束标记之前,并使用position:absolute;底部:0;

Try placing div id="subfooter-wrapper" just before the closing tag of the wrapper, and using position:absolute; bottom: 0;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文