2010-02-20 44 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