gpt4 book ai didi

html - 页脚下方的白色间隙

转载 作者:太空宇宙 更新时间:2023-11-03 18:45:17 25 4
gpt4 key购买 nike

On my site here ,我们对不同的城镇使用相同的 CSS,但是 non populated/new towns e.g. here如果没有内容,页脚会上升并在下方留下一个大的白色空白。

我试过 sticky footer method这没有用。

这是页脚 CSS:

#footer-wrapper, #push {
height: 100px; /* .push must be the same height as .footer */
overflow:hidden;
}
#footer-wrapper {clear:both;width:100%;border-top:1px solid #323232;padding:20px 0 0;
background: #33383c;
background: #3F4952 url("/images/bg.jpg") repeat;
}

内容包装器:

#main-content {
margin: 0 5% -100px;
min-width:960px;
max-width:1137px;
overflow: hidden;
}

我想知道右/左导航等列 CSS 是否会影响它,例如:

.right-nav {
float: right;
width: 29.4%;
border-left: 1px solid #Dddddd;
padding-top:2em;
padding-bottom:10040px;
margin-bottom:-10000px;
}

任何想法都会很棒。

最佳答案

min-height 放在 #main-content div 上以将页脚向下推,即使 #main-content div 没有内容。

#main-content {
margin: 0 5% -100px;
min-width:960px;
max-width:1137px;
min-height:600px;
overflow: hidden;
}

position:absolute; 添加到 #footer-wrapper div 以将其拉到 100% 高度 body 标签的底部。

关于html - 页脚下方的白色间隙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16521634/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com