In my HTML document, I have a table with two columns and multiple rows. How can I increase the space in between the first and second column with css? I\'ve tried applying \"
If padding isn't working for you, another work around is to add extra columns and set a margin via width using
. None of the padding solutions above were working for me as I was trying to give the cell border itself a margin, and this is what solved the problem in the end:
data
more data
Style the borders of the table cells using :nth-child so that the 2nd and third columns appear to be a single column.
table tr td:nth-child(2) { border: 1px solid black; border-right:0; }
table tr td:nth-child(3) { border: 1px solid black; border-left:0; }