So I got a table and I want to set a style in all <tr> elements but the first. Example:
<table>
<tr><th>This receives header styles</th></tr>
<tr><td>This receives item styles</td></tr>
<tr><td>This receives item styles</td></tr>
<tr><td>This receives item styles</td></tr>
</table>
I know I have to use selectors but I don’t know how and can’t find it on the web =S
The general sibling selector
~lets you select every certain element that comes after another. You can use this selector:Works in IE7+.
If you can modify your HTML to make it more semantic, you can place your first row with the
thcells in athead, and the rest in atbody:Then use this selector instead:
Works on older browsers in case you need it.