The following example works in Firefox 4, but not in Internet Explorer 8:
HTML:
<div class='first'>A</div>
<div>B</div>
<div>C</div>
CSS:
div:not(.first) {
color: red;
}
What workaround would you suggest to make it work in both browsers ?
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.
Why can’t you do this?:
It isn’t really a
:not()workaround, but it works for your example as far as I can tell. If you didn’t have the class you could always use:first-childas well.Demo