2010-07-19 97 views
0

我想對齊的表格單元格一些文字與PNG透明背景對準與AlphaImageLoader的中間,我使用過濾器:進程id:DXImageTransform.Microsoft .AlphaImageLoader()在IE6中解決這個問題。但文本不對齊的風格過濾器中間:「垂直對齊:中間」的表格單元格不IE6

CSS:

.fh { 
font-family:SimSun; 
font-size:12px; 
overflow:hidden; 
padding:0 2px 2px; 
text-align:left; 
vertical-align:middle; 
} 

HTML:

<table width="200" border="1" cellpadding="2" class="x-table"> 
<tr> 
<th scope="col">&nbsp;</th> 
</tr> 
<tr style="height: 77px;"> 
<td class="fh" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./shadow-trans.png')">&nbsp;ABCDEFG</td> 
</tr> 
</table> 

截圖:

"vertical_align_ie6" http://filer.blogbus.com/4216262/resource_4216262_1279530625v.png

+1

哪裏不對齊,中間因爲是默認的在垂直對齊? 另外,爲什麼你的CSS屬性用大寫字母寫? – cypher 2010-07-19 09:16:01

+0

的CSS性的判定是書面的首都,因爲我從DebugBar工具複製它,現在修改。 – Fisher 2010-07-19 14:15:48

回答

0

嘗試移位到TD或桌子的高度。

0

我發現,這個問題可以通過在其中插入一個表格一個div原點TD固定:

HTML:

<table cellspacing="0" cellpadding="0" class="x-table" style="position: absolute; width: 289px; left: 0px;"> 
    <colgroup> 
     <col style="width: 72px;"/> 
     <col style="width: 72px;"/> 
     <col style="width: 72px;"/> 
     <col style="width: 72px;"/> 
    </colgroup> 
    <tbody> 
     <tr style="height: 77px;"> 
      <td class="brw1 brss bbw1 bbss blw1 blss btw1 btss" style="border-color: rgb(153, 204, 255); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./shadow-trans.png', sizingMethod=crop);background-repeat: no-repeat;" id="A1-0" colspan="4"> 
       <div class="fx" style="height: 76px;"> 
        <table> 
         <tbody> 
          <tr> 
           <td class="fh bw" style="height: 76px; width: 288px;">ABCDEFG</td> 
          </tr> 
         </tbody> 
        </table> 
       </div> 
      </td> 
     </tr> 
    </tbody> 
</table> 
+0

如果我屬性sizingMethod =「縮放」或sizingMethod =「作物」添加到AlphaImageLoader的,它是確定。 不過,如果src屬性等於像 '/ WebReport /的ReportServer?OP = attach_image&ID = 7e2bb125-5649-4aaf-add2-86147280220c',再次有問題! – Fisher 2010-07-19 15:12:01