【发布时间】:2011-11-09 18:32:53
【问题描述】:
由于某种原因,我的内容区域的边距,150px 顶部在 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;
}
【问题讨论】:
-
您能否发布您正在使用的 HTML,以便我们知道这些元素的放置位置?
标签: css internet-explorer margin fixed