CSS, sticky footer

旧巷老猫 提交于 2019-12-02 23:09:57

问题


I know, I know, I asked this question before. Unfortunately, I lost my work. I started over and I came back to my old post (min-height:100% doesn't work on my container?) and couldn't remember what the trick actually was.

So I will post the link to my "experiment" here and I hope that you guys (or girls) can help me out, the problem is: I want the footer to be at the very bottom and the content and the two sidebars to connect to the top of the footer. (Also, the scrollbars have to disappear, haha)

http://www.jbehrens.nl/test/index.html

If anyone's able to help me, it's very much appreciated!


回答1:


Set the footer to have

position: fixed
bottom: 0

And then set a height for your side bars and content pane and you might want to set

overflow: scroll

for the side bars and the content pane.



来源:https://stackoverflow.com/questions/10465250/css-sticky-footer

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