HTML 版本的粗细也有所不同。我认为问题在于您的 CSS 规则。
这可以按照我的想法工作,尽管它可能会得到改进。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Test Table</title>
<style type="text/css">
td {
border-top: 1px solid black;
border-left: 1px solid black;
}
.right { border-right: 1px solid black; }
.bottom {border-bottom: 1px solid black; }
</style>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="a_style">Name</td>
<td class="a_style">Problem</td>
<td class="right">Treatment</td>
</tr>
<tr>
<td class="b_first">Jane Doe</td>
<td class="c_first" style="background-color:#ffff99">Cough</td>
<td class="right" style="background-color:#ffff99">Vitamins</td>
</tr>
<tr>
<td class="b">John Doe</td>
<td class="c" style="background-color:#99FF99">Sneezing</td>
<td class="right" rowspan="2" style="background-color:#99FF99">Nose Spray</td>
</tr>
<tr>
<td class="b">Joe Schmo</td>
<td class="" style="background-color:#99FF99">Sneezing</td>
</tr>
<tr>
<td class="b">Joe Six Pack</td>
<td class="c" style="background-color:#cccccc">Flu</td>
<td class="right bottom" rowspan="3" style="background-color:#cccccc">Flu Shot</td>
</tr>
<tr>
<td class="b">Joe The Plumber</td>
<td class="" style="background-color:#cccccc">Flu</td>
</tr>
<tr>
<td class="bottom">Joe Doe</td>
<td class="bottom" style="background-color:#cccccc">Flu</td>
</tr>
</table>
</body>
</html>