This CSS solution uses the border-spacing and border-collapse properties.
Here is your table rule, updated:
table { width: 100%; border-spacing: 0; border-collapse: collapse; }
It used to be that margin and table filling were mostly controlled in HTML with the attributes cellspacing and cellpadding .
<table border="1" cellpadding="5" cellspacing="10"> ... </table>
But these attributes are now obsolete. Use CSS.
Examples
table { border-collapse: separate; border-spacing: 5px; } td { padding: 5px; }
For more on border-collapse see this article.
https://developer.mozilla.org/en-US/docs/Web/CSS/border-collapse
source share