css页脚位置粘到浏览器底部? [英] css footer position stick to bottom of browser?

查看:110
本文介绍了css页脚位置粘到浏览器底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站有问题 http://artygirl.co.uk/pixie / about / 我似乎不能让页脚自动粘到浏览器的底部,并显示我的背景。
是否有比使用position:fixed或absolute更好的解决方案?



我认为可能有其他样式覆盖了firebug中的一些测试。 / p>

感谢您的帮助
Regards
Judi

解决方案

这总是有点困难,你可以增加你的内容区域的 min-height ,但即使如果有人有一个真正的大屏幕,你会看到



如果有人有一个巨大的视口,你可以使用一点JavaScript来增加 min-height 但这还不如优雅。我不确定是否有一个只有CSS的解决方案。



如果你想尝试上面的代码,我刚在这里发布:使用jQuery检测滚动条的存在仍然很困难吗?可能对您有用。


I'm having a problem with my site http://artygirl.co.uk/pixie/about/ I can't seem to get the footer to automatically stick to the bottom of the browser, and show the rest of my background. Is there a solution better than using position:fixed or absolute?

I think there are possibly other styles over-riding some tests I do in firebug.

Thanks for your help Regards Judi

解决方案

This is always a bit difficult, you could increase the min-height of your content area, but even then if someone has a really big screen you'd see the same thing.

You could use a bit of JavaScript to increase the min-height if someone has a huge viewport but that's still less than elegant. I'm not sure if there is a CSS-only solution to this.

If you want to try the above the code I just posted here: Is detecting scrollbar presence with jQuery still difficult? may be of use to you.

这篇关于css页脚位置粘到浏览器底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆