Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css IE8粘性页脚问题_Css_Internet Explorer_Internet Explorer 8_Footer_Sticky Footer - Fatal编程技术网

Css IE8粘性页脚问题

Css IE8粘性页脚问题,css,internet-explorer,internet-explorer-8,footer,sticky-footer,Css,Internet Explorer,Internet Explorer 8,Footer,Sticky Footer,如果您在Firefox中查看,您将看到底部页脚在调整大小、移动等操作时与窗口保持一致。它也从底部开始,没有滚动条。然而,在IE8中,我无法让它在开始时坐在底部,或者随着窗口移动,可能还有许多其他问题。我从那里得到了代码,它说它与IE兼容,所以我一定是做错了什么。我不得不稍微修改代码以适应我的情况,但以下是IE特有的css: * { margin: 0; } #container{ min-height: 100%; height: auto !important; height: 100%;

如果您在Firefox中查看,您将看到底部页脚在调整大小、移动等操作时与窗口保持一致。它也从底部开始,没有滚动条。然而,在IE8中,我无法让它在开始时坐在底部,或者随着窗口移动,可能还有许多其他问题。我从那里得到了代码,它说它与IE兼容,所以我一定是做错了什么。我不得不稍微修改代码以适应我的情况,但以下是IE特有的css:

* {
margin: 0;
}

#container{
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -30px;
}

#footer, .push{
height: 30px;
width: 100%;
background: -moz-linear-gradient(top, #565656, #303030);
background: -webkit-gradient(linear, left top, left bottom, from(#565656), to(#303030));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#565656', endColorstr='#303030');
text-align:center;
font-family: loginfont;
font-size:13px;
color: #fff;
padding-top:5px;
clear: both;
}

谁能告诉我出了什么问题吗?在这一点上我完全不知道。我讨厌IE…

我不确定,但它可能是
填充顶部:5px导致问题的原因。尝试更改
边距:0自动-30px
边距:0自动-35px
并查看是否有帮助。

在您的
#容器中
添加
并添加
位置:相对
#容器
,因为负边距对静态定位的元素不起作用