I have the following code

<table style="width: 100%;">
            <td style="width: 50%; border:1px solid #ccc!important; border-color:#000!important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10px;"><em>Previous editions are obsolete</em></span></span></td>
            <td style="width: 50%; border:1px solid #ccc!important; border-color:#000!important;">
            <div style="text-align: right;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10px;">Credit Union Name:</span></span></div>

in the output I am seeing gap between two table. Can anyone help me how to remove the gap between the two table.

enter image description here

  • 3
    you can post this question on stackoverflow Nov 24, 2020 at 5:19
  • it's a margin issue. Tables add margin and padding by default. you have to set it to 0
    – Mayo
    Dec 9, 2020 at 14:00

2 Answers 2


This is not a gap between two tables but between the two cells of your table. You can easily remove that (or modify it) by adding border-spacing: 0 to the table style.

By the way, I would also remove the <div> from inside the second cell. If you really need a block element there, you can use display: block.


You can also remove the gap by setting the border-collapse: collapse to the table style.

Not the answer you're looking for? Browse other questions tagged or ask your own question.