开发者

How do I make a footer sit tight against the bottom of a page without using fixed?

开发者 https://www.devze.com 2023-03-27 18:44 出处:网络
I want my footer to always be at the bottom of the p开发者_运维问答age. I tried using: bottom:0px;

I want my footer to always be at the bottom of the p开发者_运维问答age. I tried using:

bottom:0px;
position:relative;

But that seems to let it go into the middle of the screen under the text. What am I doing wrong. I really dont want to used fixed because of the IPAD!


Use position:absolute and make sure, that the footer is not inside another element with position:relative or position:absolute.

However, that will position your footer at the very end of your page, not at the lower rim of the screen. To do this you will have to do nasty Javascript hacks. Google for "iPad" and "position fixed" to get started.

Or see this SO question.

0

精彩评论

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

关注公众号