出于某种原因,我的内容区域的边距 150px top 在 Internet Explorer 中不起作用,因此内容位于标题下方。有帮助吗?我知道通常固定在 Internet Explorer 中有点奇怪,但奇怪的是这似乎有效,只是内容从页面顶部开始而不是向下 150 像素。
html {
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
overflow-x: auto;
}
body {
background-color: #FBFBFB;
margin:0;
padding:0;
}
#header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 150px;
background-color: #FBFBFB;
z-index: 100;
}
#sidebar {
position: fixed;
top: 150px;
left: 0;
width: 275px;
height: 100%;
z-index: 100;
}
#content {
width: 837px;
margin-top: 150px;
margin-left: 325px;
overflow: auto;
}
最佳答案
你有我们可以检查的链接吗?
尝试使用“padding-top: 150px”代替,除非有什么东西阻止你这样做,否则这基本上是有效的。否则,如果适用,请尝试使用“zoom: 1”、“display: block”、“position: relative”等常规技巧。
关于css - Div 的边距在 Internet Explorer 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7293954/