Internet explorer 在旧IE中定位绝对问题 。顶行{ 背景#003466; 浮动:左; 高度:107px; 宽度:100%; } .头标{ 背景:url(“../images/header.png”)顶部不重复; 位置:绝对位置; 高度:107px; 宽度:910px; } .page_包装{ 保证金:0px自动; 宽度:910px; }

Internet explorer 在旧IE中定位绝对问题 。顶行{ 背景#003466; 浮动:左; 高度:107px; 宽度:100%; } .头标{ 背景:url(“../images/header.png”)顶部不重复; 位置:绝对位置; 高度:107px; 宽度:910px; } .page_包装{ 保证金:0px自动; 宽度:910px; },internet-explorer,cross-browser,Internet Explorer,Cross Browser,在FF、Chrome和较新版本的IE上,标题图像仅显示在背景色上方。但在较旧版本的IE上,标题图像直接显示在背景色栏右侧。如何解决此问题?这是IE6的问题 常见的解决方法是添加: .top_line { background:#003466; float:left; height:107px; width:100%; } .header_logo { background:url("../images/header.png") top no-repeat; position: absolute;

在FF、Chrome和较新版本的IE上,标题图像仅显示在背景色上方。但在较旧版本的IE上,标题图像直接显示在背景色栏右侧。如何解决此问题?

这是IE6的问题

常见的解决方法是添加:

.top_line {
background:#003466;
float:left;
height:107px;
width:100%;
}
.header_logo {
background:url("../images/header.png") top no-repeat;
position: absolute;
height:107px;
width:910px;
}
.page_wrapper {
margin:0px auto;
width:910px;
}

<div class="top_line"></div>
<div class="header_logo" align="center"></div>
<div class="page_wrapper">

取决于样式表中的浮动

添加如下内容:

clear: right;
如果不起作用,请尝试:

.top_line {
clear: both;
background:#003466;
float:left;
有没有它


这些只是我为解决IE6中的同一个问题所做的一些事情。

我通过将标题图标移动到顶行CSS中解决了这个问题,最后得到了

* {
    margin: 0;
}

去哪个班?我试过几种组合,但都没有改变
.top_line {
clear: both;
background:#003466;
float:left;
* {
    margin: 0;
}
.top_line {
display:inline;
clear: both;
background:#003466;
background-image: url("../images/header.png");
background-position: top center;
background-repeat: no-repeat;
float:left;
height:107px;
width:100%;
}