+ 5

Explain me the difference

What's the difference between: table tr th { border: 2px solid; } th { border: 2px solid; }

19th Oct 2018, 10:37 AM
voja
voja - avatar
1 Respuesta
+ 5
In theory, the upper example is stricter and the styles will not apply to "th" blocks that are outside the rows of the table. In practice, when choosing from these two cases, it is enough to choose the second. Because the "th" blocks are not used outside the rows of the table.
19th Oct 2018, 10:58 AM
Daniel Holmes
Daniel Holmes - avatar