2010-07-19 94 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