2013-11-04 101 views
0

我使用下面的HTML代碼:​​對準問題7

<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標籤內部的文本對齊。我在網上搜索,但找不到任何滿意的答案。任何幫助將不勝感激。

+0

更好使用'TD {餘量重新設置:0; padding:0}' – Praveen

+0

@ user1671639感謝您的回覆,但它不起作用 –

+0

得到了!DOCTYPE聲明? – davidpauljunior

回答

0

我有一個問題,寬度td.increased到10px,它工作正常。感謝先生列出相同的。

td style="width:10px;" height="10" text-align="left">hello</td> <