I see a selector like this,
.class1 .class2 .class3 {
}
What does this mean?
I’ve used multiple class selectors without spaces. Space means descendant but it doesn’t make sense for classes.
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.
Let’s say there’s a page with the following markup,
The CSS you provided would style all elements under class3, which are under class2, which are under class1.
i.e. let’s say this was the styling,
It would render the text as red, which is the equivalent of the following,
Finally, the following would do nothing,
Edit: If the markup instead was the following,
It would work and render the text in red.
Note: < IE7 might have issues with the above…
http://www.thunderguy.com/semicolon/2005/05/16/multiple-class-selectors-in-internet-explorer/
http://www.w3.org/TR/2004/CR-CSS21-20040225/selector.html#class-html