conditional sticky CSS footer with fixed header

杀马特。学长 韩版系。学妹 提交于 2019-12-23 05:08:32

问题


I tried to find some solution for the following scenario: - fixed header - if content is too short, footer will stick to bottom - of content is longer, footer will be appended to content and scrollable

I found this, but this works only while the header's not fixed: http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

here's some fiddled CSS: http://jsfiddle.net/GxskJ/1/

I can't see what's going wrong and how to fix it. Another solution would be much appreciated as well.

thank you!


回答1:


not sure what you are doing,better description of what you want to achieve would help me in giving you a better answer..

http://jsfiddle.net/mvivekc/2a7SB/1/




回答2:


Have you thought of doing something like this:

http://jsfiddle.net/YC8DY/

This is how I do it on my website.



来源:https://stackoverflow.com/questions/9167160/conditional-sticky-css-footer-with-fixed-header

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