I would like to apply a style to every row in a table except a specific row (could be the first, or could be one with a unique class or ID – doesn’t matter).
How do I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest cross-browser way is to apply the style then override it, like this:
Since the one with the class, ID, etc is more specific, it’ll have the different styling…just put whatever properties you’re setting for all rows in that selector so it overrides/reverses the styling. The benefit of this approach is it doesn’t need any partially supported (CSS3) selectors, it already works in all browsers.