我正在使用以下 html 代码:
<table class="question" cellpadding="0" cellspacing="0" border="0" width="99%">
<tr bgcolor="#ffffff">
<td style="width:5px;" height="10" text-align="left">hello</td>
</tr>
</table>
期望的输出(在除 IE7 之外的所有浏览器中获取):
hello
在 IE 7 中得到以下输出:
hello //extra space is being added in the beginning of the text
我的问题是 IE7 中 td 标签内文本的对齐方式。我在互联网上搜索但找不到任何满意的答案。任何帮助将不胜感激。
最佳答案
我遇到了 td 宽度的问题。增加到 10px 并且它工作正常。感谢 lister 先生提出了同样的建议。
<td style="width:10px;" height="10" text-align="left">hello</td>
关于html - IE 7 中的 <td> 对齐问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19761929/