【问题标题】:How to cancel a space between separate table cells如何取消单独表格单元格之间的空格
【发布时间】:2018-04-04 20:25:40
【问题描述】:

我制作了一个边框间距为 16 像素高度的表格,我只想取消一个特定单元格的该空间。 这是表格:

<table width="100%" style="text-align: center; position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-collapse: separate; border-spacing: 0 16px;">
  <tr style="background-image: url(Pics/background.jpg);">
    <td> Some text </td>
  </tr>
<!--Only here I do not want a space-->
  <tr style="border-collapse: collapse; border-spacing: 0 0;">
    <td> Text </td> 
  </tr>
</table>
    
  

我想为桌子的其余部分保留空间,希望您能提供帮助。

【问题讨论】:

    标签: html html-table collapse border-spacing


    【解决方案1】:

    我解决了!!! 我只是简单地定位了我想要没有空间的行,使其顶部的行更高,直到它们之间的空间消失。 我用过的代码:

    &lt;td style="position: relative; bottom: 18px;&gt;

    就这么简单..xD

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-08
      • 1970-01-01
      • 1970-01-01
      • 2020-03-25
      • 1970-01-01
      相关资源
      最近更新 更多