CSS Floating Footer

人走茶凉 提交于 2019-12-03 12:59:32

问题


I want to make a footer that stays at the bottom of the viewable window UNLESS it butts up against the content when you resize the window smaller.

I tried... bottom:0; position:absolute; ...but the footer gets in the way when the window is smaller.


回答1:


I believe this will do what you want: CSS layout: 100% height with header and footer. I've used it on a site and it can be tricky to implement depending on the complexity of your existing layout.




回答2:


I use the method as described by The Man In Blue called footerStickAlt - works a charm, CSS won't validate if you include the IE6 hack though.



来源:https://stackoverflow.com/questions/436165/css-floating-footer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!