开发者

trying to get footer to stick to bottom

开发者 https://www.devze.com 2023-02-20 08:58 出处:网络
here is my site http://iadprint.com/services i have tried everything to get the footer to stick to the bottom but nothing wont work other 开发者_开发知识库than doing a set height in css on the tag #c

here is my site http://iadprint.com/services

i have tried everything to get the footer to stick to the bottom but nothing wont work other 开发者_开发知识库than doing a set height in css on the tag #cright but i dont want to do that since dynamic content would go in there. can anyone see what im missing or doing wrong?

thanks


add to your footer css

position:absolute;
bottom:0;

If you want footer to always be at the bottom regardless of window scroll then use

position:fixed;
bottom:0;


Have you tried using the 'sticky footer' trick in combination with Javascript (e.g. jQuery.height())? You could detect the new footer height and update the css accordingly.

See also this CSS-Tricks article.

0

精彩评论

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

关注公众号