粘贴页脚

发布于 2024-10-09 02:25:38 字数 655 浏览 0 评论 0原文

我尝试让页脚粘在该网站的页面底部: https://account.radonsystems.net

不幸的是,它似乎不起作用,尽管它在我使用过的其他地方都可以工作。

这是粘性的 CSS:

html, body {height: 100%;}

#wrap {min-height: 100%;}

#main {overflow:auto;
padding-bottom: 57px;}  /* must be same height as the footer */

#footer {position: relative;
margin-top: -57px; /* negative value of footer height */
height: 35px;
clear:both;}

/*Opera Fix*/
body:before {
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px;/
}    

.footer a,.footer a:hover{text-decoration:underline;color:#FFF;}

有人知道为什么它不粘在底部吗?

I'm try to get my footer to stick to the bottom of the page on this website: https://account.radonsystems.net.

Unfortunately, it seems not to be working, though it is working everywhere else I've used it.

This is the CSS for the sticky:

html, body {height: 100%;}

#wrap {min-height: 100%;}

#main {overflow:auto;
padding-bottom: 57px;}  /* must be same height as the footer */

#footer {position: relative;
margin-top: -57px; /* negative value of footer height */
height: 35px;
clear:both;}

/*Opera Fix*/
body:before {
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px;/
}    

.footer a,.footer a:hover{text-decoration:underline;color:#FFF;}

Does anyone have any idea of why it's not sticking to the bottom?

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

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

发布评论

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

评论(3

夏见 2024-10-16 02:25:38

我可以告诉你一个更好的选择来修复它在底部

只需应用样式作为

#footer {
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    width:100%;
    height:57px;
}

感谢和问候,

Wazzy

I can tell you a better option to fix it at the bottom

Just apply style as

#footer {
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    width:100%;
    height:57px;
}

Thanks and regards,

Wazzy

娇俏 2024-10-16 02:25:38

如果它在其他地方都可以工作,那么一定是该 html 页面出了问题,而不是 CSS,也许可以发布 HTML 页面代码,或者将其与实际正常工作的代码进行比较。

If it works everywhere else, then something must be wrong with that html page, not the CSS, maybe post the HTML page code, or compare it to those that actually work correctly.

少女的英雄梦 2024-10-16 02:25:38

查看此链接中的粘性页脚教程,了解粘性页脚概念的工作原理。这应该可以帮助您比较 html 结构和 css 来找到问题。如果您可以给我们您的 html,我们可以和您一起查看。

Look over the sticky footer tutorial at this link to see how the sticky footer concept works. This should help you be able to compare your html structure and css to find the problem. If you can give us your html we can look at it with you.

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