我的正文标签不会延伸到页面底部
我已经在网上搜索了两天,但一直无法弄清楚这一点。我正在制作一个包含大量 php 文件的网页,我被要求制作一个包含联系信息等的页脚。
问题是我无法让页脚粘在底部,我发现它因为正文并没有一直延伸到页面底部。
I´ve been searching the interweb for two days, but have not been able to figure this out. I am making a webpage with loads of included php files, and I have been asked to make a footer with contact information etc.
The problem is that i can´t get the footer to stick to the bottom, and I have discovered that it´s because the body doesn´t extend all the way to the bottom of the page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅此链接以获取解决方案:http://ryanfait.com/sticky-footer/
用纯 CSS 制作:)
body 元素没有您想象的高度,它与其中的元素一样高。
See this link for a solution: http://ryanfait.com/sticky-footer/
Made with pure CSS :)
The body element doesn´t have a height like you think of it, it is as height as the elements in it.
我找到了一个完美回答您问题的链接,即“Stay On Top”脚本,位于 http:// /www.dynamicdrive.com/dynamicindex17/stayontop.htm
I have found a link that perfectly answers your question, that is "Stay On Top" script at http://www.dynamicdrive.com/dynamicindex17/stayontop.htm