2012-06-22 42 views
1

將文本放在多個表中時我有一個簡單的問題! 請看看代碼。在這段代碼中,看看名爲「它爲什麼在中間」的文本總是停留在中間,我不能將它們放在該表的頂部!修復表中的文本位置

CODE

<table width="100%" border="0"> 
    <tr> 
    <td width="50%"><table width="100%" border="0"> 
     <tr> 
     <td>welcome</td> 
     </tr> 
     <tr> 
     <td>some code here </td> 
     </tr> 
     <tr> 
     <td>php script here </td> 
     </tr> 
    </table></td> 
    <td width="50%">why it is in middle </td> 
    </tr> 
</table> 

因此,如何能我把它放在表的頂部?

回答

1

使用css屬性vertical-align: top;。見demo

0

如果您想使用內聯表屬性,還有valign。

<td valign="top">This will be at the top</td>