css property definition

Grey

New Member
I have a css class for a table definition like the following\[code\].tabborder{ border: 1px solid black; border-collapse: collapse;}\[/code\]And then I want all the \[code\]th\[/code\] and \[code\]td\[/code\] elements that are nested within the element that has the class="tabborder" to do the following\[code\].tabborder th, td{ border: 1px solid black; border-spacing: 0;}\[/code\]Having \[code\]th, td\[/code\] wouldnt work while just \[code\]th\[/code\] or \[code\]td\[/code\] works the way I want it to. Is there a workaround for that. I know that writing seprate definitions like below worksBut is there an efficient way to do this\[code\] .tabborder th{ border: 1px solid black; border-spacing: 0;} .tabborder td{ border: 1px solid black; border-spacing: 0;}\[/code\]Thanks in advance
 
Back
Top