页脚绝对到底部但在包装内(footer absolute to bottom but within wrap)

编程入门 行业动态 更新时间:2024-10-26 02:32:18
页脚绝对到底部但在包装内(footer absolute to bottom but within wrap)

我希望我的页脚是底部:0但同时它在包裹内,宽度等于968px。 我试过玩绝对和亲戚,而不是工作..

I want my footer to be bottom:0 but in the same time it's within the wrap, which width equal to 968px. I tried playing with absolute and relative, not work..

最满意答案

问题是你的包装器高度只有588px。 所以页脚会走到底部。

您可以通过以下方式解决此问题

.wrapper { position:absolute; min-height: 100%; left: 50%; margin-left: -484px; }

The problem is that your wrapper is only 588px in height. So the footer is going to the bottom of that.

You can fix this, by:

.wrapper { position:absolute; min-height: 100%; left: 50%; margin-left: -484px; }

更多推荐

本文发布于:2023-08-07 07:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1461585.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:但在   footer   absolute   bottom   wrap

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!