How to eliminate white space between columns?

Asked

Viewed 1,320 times

1

I have the following table:

<table>
  <tr>
    <td style="border-top:1pt solid black">A</td>
    <td style="border-top:1pt solid black">B</td>
  </tr>
</table>

Note that by placing the edge on td's the row has no continuity from one column to another, but has a blank interval. How can I remove this space using border in td how are?

Result obtained:
inserir a descrição da imagem aqui

Desired result:
inserir a descrição da imagem aqui

2 answers

4


Add style="border-collapse: collapse;" in the tag or css:

table {
border-collapse: collapse;
 }
<table>
  <tr>
    <td style="border-top:1pt solid black">A</td>
    <td style="border-top:1pt solid black">B</td>
  </tr>
</table>

0

The tag TABLE has a priority for this. Try the code below:

 <table cellpadding="0" cellspacing="0">
  • 1

    thank you so much for the reply @Rogeriosoaresferreira the only problem is that the attribute cellspacing is not supported in HTML5.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.