Can we use like this <body class="all" <!--[if IE 7]>class="ie"<![endif]--> >?
I want to keep all CSS in one file.
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.
You could use:
That way the css selector to address IE’s flaws/differences is more specific than the normal
…and should override the ‘normal’
#contentrules and will never be applied by non-IE browsers, since there’s an element.ieOnlyin the selector which is otherwise ‘invisible’ to them.Still, strictly speaking, no; you can’t do what you propose in your question, though there are alternative approaches.