2009-11-30 39 views
0

此頁面http://winteradagency.com/Arvin/incentives/lenders.htm在除IE6之外的所有瀏覽器中看起來都不錯。出現問題的是那些需要放在中心圖片頂部的大字,說「貸方扣除」。在IE6中,他們正在向右移動,導致瀏覽器窗口進行水平滾動。絕對定位的標記在IE6中不起作用

我需要使用這些單詞的2個不同實例來創建人造陰影外觀。所以一個是在另一個的頂部,而在兩個方向都是一個像素。

我使用這個網站碼:

<div id="centerInc"> 
    <p class="centerAlign3">Deductions for Lenders</p> 
    <p class="centerAlign2">Deductions for Lenders</p> 
</div><!--end center image div--> 

,這裏是從styles.css的網站上的CSS:

#container #centerInc { 
background-image: url(images/IncCenter.jpg); 
height: 183px; 
width: 875px; 
margin-top: 160px; 
float: left; 
font: bold 2.6em Georgia, "Times New Roman", Times, serif; 
color: #FFF; 
background-repeat: no-repeat; 
text-align: right; 
position: absolute; 
} 

.centerAlign2 { 
font: normal 1.15em Georgia, "Times New Roman", Times, serif; 
color: #FFF; 
position: absolute; 
width: 860px; 
margin-top: 115px; 
} 
.centerAlign3 { 
font: normal 1.15em Georgia, "Times New Roman", Times, serif; 
color: #000; 
position: absolute; 
width: 861px; 
margin-top: 114px; 
} 

任何想法,將不勝感激。我仍然是一個真正的新秀。 謝謝!

回答

0

可以嘗試使用「溢出:隱藏」在centerInc

我將通過創建一個GIF或JPEG解決這個問題。在ie9或firefox 11或新瀏覽器0.5中不起作用只是個時間問題。

+0

是的,我已經決定忘記嘗試在圖片上添加文字,並且僅僅使每個圖片都已經包含文字。 – Drea 2009-11-30 20:23:15

0

隨着position: absolute我肯定會指定x/y位置(即topleft),我想我沒有看到你這樣做。就目前情況而言,您可以讓瀏覽器自由決定在哪些位置放置這些DIV。

+0

我看不出如何做x/y定位,除了在背景圖像的情況下。 (我正在使用Dreamweaver),但是,我已經決定忘記將圖像添加到圖像頂部,並且只是將每個圖像與已經存在的文本進行匹配。 – Drea 2009-11-30 20:13:14

0

清除您的花車:Clearing a float container without source markup

你已經有了一個額外的</div>標籤,可能另一個問題,以及其他一些錯誤: [Invalid] Markup Validation of winteradagency.com/Arvin/incentives/lenders.htm - W3C Markup Validator

您可能還需要一個特定的IE6的樣式表:CSS - Conditional comments

+0

感謝您的幫助。鏈接到CSS條件評論將在未來幫助我。和標記驗證器的鏈接幫助我看到了一些其他的錯誤。 我已經決定忘記試圖在圖像上添加文本,只是使每個單獨的圖像與文本已經在它。 – Drea 2009-11-30 20:12:26