我的桌子目前没有按照我的意愿行事,可能只是这个宿醉,但我似乎无法弄明白为什么。以下是我试图让表格看起来像:
(在油漆区做过)
这是我的编码:
<table border="1">
<th>Therapeutic Riding</th>
<tr>
<td>Joy Adamski</td>
<td>Driving Instructor in training</td>
</tr>
<tr>
<td>Diana Beardsley</td>
<td>CHA: Level Three English and Level Two Western (Standard)<br />
Level Two Physical & Cognitive (IRD)<br />
PATH International Registered Instructor; Level One Driving Instructor
</td>
</tr>
<tr>
<td>Tammi Gainer</td>
<td>CHA: Clinic Instructor in Standard,Vaulting,and IRD<br />
PATH International Registered Instructor
</td>
</tr>
<tr>
<td>Karen Layton</td>
<td>CHA: Level Two English & Western (Standard)<br />
Level One Physical & Cognitive (IRD)<br />
PATH International Registered Instructor
</td>
</tr>
<tr>
<td>Audre Mallinak</td>
<td>PATH International Registered Instructor</td>
</tr>
<tr>
<td>Randy Pittis</td>
<td>CHA: Level Two English & Western (Standard)<br />
Level One Physical & Cognitive (IRD)<br />
PATH International Registered Instructor
</td>
</tr>
<tr>
<td>Karen Smith</td>
<td>"Day at the Farm" Group Instructor</td>
</tr>
<tr>
<td>Tamara Weber</td>
<td>
CHA: Level Two English & Western (Standard)<br />
PATH International Registered Instructor
</td>
</tr>
</table>
答案 0 :(得分:2)
您需要将colspan=2
添加到
<th colspan=2>Therapeutic Riding</th>
另外,您应该添加以下CSS
th{
text-align:center;
font-weight:bold;
}
示例:http://jsfiddle.net/jasongennaro/gfdTP/
某些padding
也可能有助于提高可读性
th, td{
padding:.5em;
}