【发布时间】:2021-02-13 21:21:46
【问题描述】:
我想给表格加个边框,
<table style="border: 1pt solid black;display: inline-block;">
<tbody style="">
<tr>
<th" >Title1</th>
<th" >Title2</th>
</tr>
<tr>
<td t-esc=""/>
<td t-esc=""/>
</tr>
</tbody>
</table>
但是当我尝试添加这种样式时:
<style>
td, th{border:solid 1px;text-align:center;}
</style>
有什么帮助吗?谢谢。
我尝试了这两种解决方案,但得到了以下结果:
<table class="table">
<tbody style="">
<tr>
<th >Title1</th>
<th >Title2</th>
</tr>
<tr>
<td > Field1 </td>
<td > Field2 </td>
</tr>
</tbody>
</table>
<table style=" border-collapse: collapse;">
<tbody >
<tr>
<th style=" border-collapse: collapse;" >Title1</th>
<th style=" border-collapse: collapse;" >Title2</th>
</tr>
<tr>
<td style=" border-collapse: collapse;" > Field1 </td>
<td style=" border-collapse: collapse;" > Field2 </td>
</tr>
</tbody>
【问题讨论】:
标签: javascript python xml odoo