我有這個簡單的HTML表格。html簡單對齊,在表格和頁面中
<table align="center" border="1" cellpadding="0" cellspacing="0" style="width:1000px">
<thead>
<tr>
<th scope="row">BB<br />
BB<br />
BB</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
<th scope="col">AA</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<p> </p>
但是我希望AA細胞在垂直方向排列(現在它的排列中心垂直)。 而且我想要表格上方的空間並將表格留空。
在html中呈現簡單的代碼我會理解我的意思。
現在我想鏈接一個簡單的CSS來使這個功能,但我怎麼能做到這一點?
更新,在CSS的解決方案是:
th{
vertical-align:top;
}
body
{
margin: 0;
padding: 0;
}
THX。
thx,但我怎樣才能從上面刪除空間並離開桌子? – user2670708
將body上的填充設置爲0:'body {padding:0}'。 – BenM