2010-02-20 46 views
0
.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"> 

在FF,Chrome和更新版本的IE浏览器中,标题图片正确显示在背景颜色上。然而,它直接出现在老版IE浏览器的背景颜色栏的右侧。我该如何解决?旧版IE浏览器的绝对位置问题

回答

0

我由header_logo移动到top_line CSS解决了这个问题,并结束了与

.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%; 
} 
0

它是一个IE6问题。

的常见解决方法是增加:根据您的漂浮在样式表

clear: both; 

clear: left; 

clear: right; 

。有没有它

* { 
    margin: 0; 
} 

添加它像这样:

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

如果不工作,那么尝试。

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

+0

要哪一类?我已经尝试了几个组合,没有任何变化 – Splashlin

+0

感谢您的更新,但没有任何上述工作 – Splashlin