html - NetSuite 高级 PDF 模板 CSS 和 HTML 在添加额外的表格行时忽略高度并弄乱布局

标签 html css netsuite

我有下表,它的布局很好,中间一列占页面的 70%。但是,当我取消注释前两个表格行时,它会弄乱布局,中间列只显示页面的大约 50%。水平线和“接收者:”行也会忽略任何高度和行高的变化。这是 NetSuite 高级 PDF/HTML 报告模板的一部分。

有人知道为什么吗?

            <table class="footer" style="width: 100%">
  <!-- <tr><td colspan="4" rowspan="1" style="width: 100%;"><span class="synh7recby">Received by:&nbsp;</span></td></tr>
  <tr><td colspan="4" rowspan="1" style="width: 100%; height:1px;"><hr /></td></tr> -->
  <tr>
  <td rowspan="2" style="width: 20%;"><barcode codetype="code128" showtext="true" value="${record.tranid}"/></td>
  <td colspan="2" rowspan="1" style="width: 70%;"><span class="synh9"><strong>BANKING DETAILS:</strong> Standard Bank, Company, Account No: 1, Branch Code: 2, SWIFT Addr: 3</span></td>
  <td align="right" rowspan="2" style="width: 10%;"><pagenumber/> of <totalpages/></td>
  </tr>
  <tr>
  <td rowspan="1" style="width: 34%; padding: 3px 5px 0px 0px;"><span class="synh11">The debt evidenced by this account has been ceded. No set off will be recognised. No obligation has been delegated by us and any claim or dispute will remain our responsibility.</span></td>
  <td rowspan="1" style="width: 34%; padding: 3px 0px 0px 5px;"><span class="synh11">All supplies and services shall exclusively be subject to the terms and conditions. On request, we will provide you with a copy of the terms and conditions.</span></td>
  </tr></table>

使用的 CSS:

  .synh7 {
      font-size: 10pt;
      line-height: 110%;
  }
  .synh9 {
      font-size: 8pt;
      line-height: 110%;
  }
  .synh11 {
      font-size: 7pt;
      line-height: 100%;
  }
  .synh7recby {
      font-size: 10pt;
      line-height: 70%;
  }

最佳答案

设法修复它:

            <table class="footer" style="width: 100%">
  <tr>
     <td colspan="1" rowspan="1" style="width: 20%; line-height: 100%; height: 100%;"><span class="synh9">Received by:&nbsp;</span></td>
     <td colspan="2" rowspan="1" style="width: 70%;">&nbsp;</td>
     <td colspan="1" style="width: 10%;">&nbsp;</td>
  </tr>
  <tr><td colspan="4" rowspan="1" style="width: 100%; height:1px; line-height: 3px;"><hr /></td></tr>
  <tr>
  <td rowspan="2" style="width: 20%;"><barcode codetype="code128" showtext="true" value="${record.tranid}"/></td>
  <td colspan="2" rowspan="1" style="width: 70%;"><span class="synh9"><strong>BANKING DETAILS:</strong> Bank, Account No: 1, Branch Code: 2, SWIFT Addr: 3</span></td>
  <td align="right" rowspan="2" style="width: 10%;"><pagenumber/> of <totalpages/></td>
  </tr>
  <tr>
  <td rowspan="1" style="width: 34%; padding: 3px 5px 0px 0px;"><span class="synh11">The debt evidenced by this account has been ceded to the bank. No set off will be recognised. No obligation has been delegated by us and any claim or dispute will remain our responsibility.</span></td>
  <td rowspan="1" style="width: 34%; padding: 3px 0px 0px 5px;"><span class="synh11">All supplies and services of the company shall exclusively be subject to the terms and conditions on our website. On request, we will provide you with a copy of the terms and conditions.</span></td>
  </tr></table>

关于html - NetSuite 高级 PDF 模板 CSS 和 HTML 在添加额外的表格行时忽略高度并弄乱布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56560995/

相关文章:

javascript - 无法根据下拉选择禁用文本字段 (JavaScript)

html - 使用垫子按钮以 Angular 构建导航栏

javascript - 如何只更新某些行项目而不在 NetSuite 上保存整个记录?

javascript - 谷歌地图加载ajax

javascript - 使用正则表达式将中断标签替换为其他一组中断标签

css - 改进 div 对齐

css - Bootstrap + 移动菜单覆盖

javascript - 如何将 csv 数据导入 netsuite?

netsuite - 如何使用 Suitescript 2.0 在 netsuite 中设置 RESTlet 的日期

html - 可以在没有标签的情况下渲染 wtf.form_field 吗?