Search code examples
htmlhtml-tableborder-spacing

How to cancel a space between separate table cells


I've made a table with border-spacing of 16px height and I want to cancel that space only for one specific cell. Here's the table:

<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>
    
  

I want to keep the space for the rest of the table, hope you can help.


Solution

  • I solved it!!! I've simply positioned the row I wanted to have no space with the row on top of it higher 'till the space between them was gone. The code I've used:

    <td style="position: relative; bottom: 18px;>

    Simple as that.. xD