2010-08-06 52 views
0

我知道這是從我的谷歌搜索IE6的常見問題,但我所嘗試過的一切都失敗了。這是我的HTML:背景圖片沒有出現。 IE6失敗

<table width="750" border="0" cellspacing="5" cellpadding="5" class="largetable" > 
    <tr> 
    <td width="65px"><b>SELECT</b></td> 
    <td class="plus" width="300px"> 
     <select id="op" name=""> 
     <option selected="selected"></option> 
     <option>SUM</option> 
     <option>AVG</option> 
     <option>MIN</option> 
     <option>MAX</option> 
     </select> 

     <!-- problem here, background image not showing --> 
     <a href="#" onclick="add_select(); return false;"></a> 

我的CSS:

.plus a { 
    background-image:url("../images/plus.png"); 
    background-repeat:no-repeat; 
    border:medium none; 
    margin-left:3px; 
    padding:6px 4px 6px 30px; 
    background-position:2% 100%; 
} 

的問題是,背景圖像不會出現。它出現在我的Firefox瀏覽器中,但不在IE6上。

我試過使用height: 1%position:relative,都沒有工作。我嘗試了很多其他的東西,但該死的東西不會出現。

回答

3

IE6不會呈現空的內嵌元素。添加display: inline-block應該修復它。您可能更願意在* html .plus a CSS hack中僅使用該規則來定位IE;不過我認爲在其他地方一般應該沒問題。