Jamter
Jamter

Reputation: 455

the reset css of table

We can always see such selector in a Reset Css File:

table{table-collapse:collapse;table-spacing:0}

In my opinion, the "border-spacing:0" is useless, because the "border-spacing" property works only when the value of "border-collapse" property is "separate". When the value of "border-collapse" is "collapse", it will ignore the "border-spacing" property.

Is there anything wrong with my comprehension? Thank you.

Upvotes: 4

Views: 513

Answers (1)

Brett
Brett

Reputation: 20059

IMO it's advisable to keep it reset in there to border-spacing: 0; as what if in a later style someone overrides table-collapse to separate?

If border-spacing isn't reset to 0 then they will end up with the default value which should have been reset with everything else.

Upvotes: 2

Related Questions