Meaning making the resultant table look less like this:
[===ROW===] [===ROW===] [===ROW===] [===ROW===]
... and more like this:
[===ROW===] [===ROW===] [===ROW===] [===ROW===]
I tried adding
margin-bottom:1em;
to both td and tr but got nothing. Any ideas?
Cell padding is the space between cell borders and the content within a cell. To set cell padding in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <table> tag, with the CSS property padding.
To give to space between two divs, just add display: flex in the parent element. Then add an justify-content: space-between after adding this you will see a space between two divs.
All you need:
table { border-collapse: separate; border-spacing: 0 1em; }
That assumes you want a 1em
vertical gap, and no horizontal gap. If you're doing this, you should probably also look at controlling your line-height.
Sort of weird that some of the answers people gave involve border-collapse: collapse
, whose effect is the exact opposite of what the question asked for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With