100%高度问题
这是我正在开发的网站: http://antidote.treethink.com/about/
我我试图让页脚始终位于屏幕底部,除非内容超出屏幕,然后它将位于内容下方。
为此,我认为让“包装器”div 的最小高度为 100%,然后告诉页脚位于该 div 的底部。我尝试将 min-height 类放在 body、html 和包装标签上,但它不起作用。
这是我的CSS: http://antidote.treethink.com/ wp-content/themes/antidote-new/style.css
谢谢, 韦德
here's the site I'm working on: http://antidote.treethink.com/about/
I am trying to get it so that the footer is always at the bottom of the screen unless the content runs past the screen, then it will sit below the content.
To do this, I thought to have the "wrapper" div be 100% min-height then tell the footer to sit at the bottom of that div. I tried putting min-height classes on the body, html and wrapper tags but it didn't work.
This is my css: http://antidote.treethink.com/wp-content/themes/antidote-new/style.css
Thanks,
Wade
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试经典的解决方案
main.css
ie.css
You can try classic solution
main.css
ie.css
这就是我的想法。我的想法是创建一个容器 div 来保存您的内容。将页脚放置在其中
bottom: 0px;
的相对位置。我认为这应该可行...
编辑
实际上我的头顶不对。不过这篇文章过去对我有帮助......
http://ryanfait.com/resources/footer-stick-to-页面底部/
This is just off the top of my head. My thought create a container div that holds your content. Put the footer at an relative position of
bottom: 0px;
within that.I think that should work...
Edit
Actually the top of my head is not right. This post has helped me in the past though...
http://ryanfait.com/resources/footer-stick-to-bottom-of-page/