I have a div like : <div class='class'>
I notice that div.class handles this style, while .class div does not. Moreover, .class handles the style as well.
Why is 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.
div.classlooks for adivwith theclassclass present..class divlooks for adivthat is a descendent of an element with theclassclass.Your element is a
divwith theclassclass, hence the selector does not select it..classwill select any element with that class, including anydivelements.