Link codepen
I achieve this point(Remove the default spacing between the table elements borders to get the expected result.
) by using padding. I am not sure it is correct. I try to use border-spacing property but it it was not possible because of collapse value of border-collapse property. Thank you.
Nice work!
- I think “Remove the default …” refers to using
border-collapse: collapse;
. - Instead of the
padding-right
you could also addtd
to your first rule to give all cells a nice padding on all sides. - Your usage of the various
:nth-child()
selectors looks fine.
I hope that helps.
Michael
1 Like