我看了这个主题的其他问题,但答案对我没有帮助。 这有点难以解释,但我会尝试。所以我有一个页脚:
#fußzeile{
width: 100%;
background-color: #e9e8e5;
padding-top: 14px;
padding-bottom: 14px;
bottom: 0;
padding-left: 24px;
height: 36px;
text-align: center;
}
我试过overflow: hidden, height: 100%
等
我使用margin-top来推动包装,然后它可以工作,但如果我最小化网站,则差距又回来了。位置:绝对/相对也不起作用..
答案 0 :(得分:2)
尝试在css中使用以下内容:
#fußzeile{
position: fixed;
bottom: 0px;
}
答案 1 :(得分:0)
试试这个:
#fußzeile{
display:block;
position:absolute;
left:0;
right:0;
bottom:0;
background-color: #e9e8e5;
padding-top: 14px;
padding-bottom: 14px;
padding-left: 24px;
height: 36px;
text-align: center;
}
Here 是一个有效的演示。
答案 2 :(得分:0)
当页脚上方没有内容时会发生这种情况。您可以尝试在任何容器外移动页脚div(如果它包含在容器中,请确保它是html的直接子项),然后创建POSITION:absolute;
答案 3 :(得分:0)
position: absolute;
width: 100%;
这为我纠正了2行代码。