开发者

Set position of page footer using CSS/JS

I've created a standard header, body, foote开发者_开发问答r web page. I want to position the footer to be at the bottom of the viewable browser window when the body is smaller than the height of the window, but at the bottom of the page when the body exceeds the browser height.

Any suggestions on how I use CSS (preferably) or JS to accomplish this?


What you're looking for is a css sticky footer. Similar questions are:

Sticky Footer help!

Problem with CSS Sticky Footer implementation

There are a lot of different ways of accomplishing this. I personally use this: http://www.cssstickyfooter.com/

Edit: did some more searching and I think I found a duplicate so this should probably be closed:

How do you get the footer to stay at the bottom of a Web page?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜