此代码不会使最后2个单元格覆盖3个3行。 我应该怎么解决? 这是代码:
<table border="2">
<tr>
<th rowspan="3">Day</th>
<th colspan="3">Seminar</th>
</tr>
<tr>
<th colspan="2">Schedule</th>
<th rowspan="2">Topic</th>
</tr>
<tr><th>Begin</th><th>End</th></tr>
<tr>
<td rowspan="2">Monday</td>
<td rowspan="2">8:00 a.m.</td>
<td rowspan="2">5:00 p.m.</td>
<td>Introduction to XML</td>
</tr>
<tr><td>Validity:DTD and Relax NG</td></tr>
<tr>
<td rowspan="3">Tuesday</td>
<td>8:00 a.m.</td>
<td>11:00 a.m.</td>
<td rowspan="1.5">XPath</td>
</tr>
<tr>
<td>11 a.m.</td>
<td>2:00 p.m.</td>
</tr>
<tr>
<td>2:00 p.m.</td>
<td>5:00 p.m.</td>
<td rowspan="1.5">XSL Transformations</td>
</tr>
</table>
rowspan不允许1.5。如果不加倍所有行和列,我怎么能这样做?
答案 0 :(得分:2)
我试过这个例子,这是我的版本:
<table width="500px" border="1" cellpadding="0" cellspacing="2px" style="text-align: center;">
<tr>
<td rowspan="3">DAY</td>
<td colspan="3">SEMINAR</td>
</tr>
<tr>
<td colspan="2">SHEDULE</td>
<td rowspan="2">TOPIC</td>
</tr>
<tr>
<td>BEGIN</td>
<td>END</td>
</tr>
<tr>
<td rowspan="2">Monday</td>
<td rowspan="2">8:00 am</td>
<td rowspan="2">5:00 am</td>
<td>Introduction to xml</td>
</tr>
<tr>
<td>Validaty: DTD and Relax NG</td>
</tr>
<tr>
<td rowspan="5">Tuesday</td>
<td rowspan="2">8:00 am</td>
<td rowspan="2">11:00 am</td>
<td rowspan="3">XPath</td>
</tr>
<tr></tr>
<tr>
<td rowspan="2">11:00 am</td>
<td rowspan="2">2:00 pm</td>
</tr>
<tr>
<td rowspan="2">XSL transformations</td>
</tr>
<tr>
<td>2:00 pm</td>
<td>5:00 pm</td>
</tr>
<tr>
<td>Wensday</td>
<td>8:00 am</td>
<td>12:00 pm</td>
<td>XSL Formatting Objects</td>
</tr>
预览here