我有一个包含这样代码的表:
<table cellpadding="6" rules="groups" frame="no">
<thead>
<tr><th>Date</th><th>Length</th><th>Time</th></tr>
</thead>
<tbody>
<tr><td>31. January1</td><td>28 km</td><td>3 hours</tr>
</tbody></table>
问题是在IE中表有框架和tableborder = 1。 怎么办?
答案 0 :(得分:1)
答案 1 :(得分:1)
试试这个:
<!DOCTYPE html>
<html>
<head>
<title>Example:Table with Header Underline Border</title>
<style type="text/css">
table.groups
{
border-collapse: collapse;
}
table.groups thead th
{
border-bottom: solid 1px black;
}
table.groups th,
table.groups td
{
padding: 6px;
}
</style>
</head>
<body>
<table class="groups">
<thead>
<tr><th>Date</th><th>Length</th><th>Time</th></tr>
</thead>
<tbody>
<tr><td>31. January1</td><td>28 km</td><td>3 hours</td></tr>
</tbody>
</table>
</body>
</html>
需要注意的几件具体事项:
答案 2 :(得分:0)
border="0"
但是,您应该使用样式表代替这样的事情......
答案 3 :(得分:0)
使用
style =“border:1px solid black”
在table-tag中,然后。
哦,最后一个单元格没有关闭。