在其他浏览器中的效果:在ie6中的效果:结构是这样的:
<div>
    texttexttext
    <input type=button />
</div>
其中黄色的button高度和div高度是一样的。
请问怎样才能垂直对齐啊?IE6浏览器HTML

解决方案 »

  1.   

    内容只有一行,可能通过设置line-height:35px来达到垂直居中。
      

  2.   

    在div中有一个STYLE对象中包含一个属性Line-height设置与Height属性值相同即可。
      

  3.   

    <div style="background-color:#0000FF; font-size:16px;">
    <table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td nowrap="nowrap">texttexttextaaaaa</td>
    <td nowrap="nowrap"><input type=button  style="font-size:14px;" value="abc" align="absmiddle" /></td>
      </tr>
    </table>      
    </div>