我有一个有3个表的页面。
我需要的表有一个id "tblContent“
我设置了表格的边框:
#tblContent
{
width:100%;
border:1px solid black;
border-collapse:collapse;
}但这只会在表格周围设置边界。
如何修改CSS使其同时具有行和列的边框?
发布于 2015-11-06 05:17:31
还可以向表单元格添加边框。
#tblContent td, #tblContent th {
border:1px solid black;
}
#tblContent {
width: 100%;
border: 1px solid black;
border-collapse: collapse;
}
#tblContent td,
#tblContent th {
border: 1px solid black;
}<table id="tblContent" style="width: 100%">
<tr>
<th> </th>
<th> </th>
<th> </th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
https://stackoverflow.com/questions/33554920
复制相似问题