iTextSharp:内部表的td元素上的边框未正确显示

时间:2019-01-21 05:43:20

标签: html css itext

enter image description here

我想在内部表td元素的顶部添加边框。但是它只是在角落而不是整个顶部显示。这是代码。

<table style="width:100%; font-size:11px; repeat-header:yes;" cellpadding="1" cellspacing="1"> 
     <tr style="page-break-before:always; background-color:#fff">
         <td colspan="5" style="background-color:#ffffff; background:#ffffff;">
             <table class="page-break-details" style="width:100%; border-collapse: collapse; font-size:14px;" cellpadding="1" cellspacing="1">
                 <tr style="margin-top:2px;">
                     <td colspan="5" style="text-align:center; margin-top:2px; border-top:5px solid #000;">
                         <h2> Report </h2>
                     </td>
                 </tr>
             </table>
         </td>
     </tr>
</table>

请参见 Report td元素。它只是在转角处显示边框,而不是整个td

0 个答案:

没有答案