I’m trying to access the h1 element inside a div with an id of “header”.
Should I use
#header h1
or
#header.h1
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.
Means “all h1 elements that are descendants of the element with the id “header” (you probably want this one).
Means “the element with the id “header” that also has the class name h1″ (you definitely don’t want this one).
Means “all h1 elements that are direct children of (i.e., directly underneath) the element with the id “header”. This type of selector is not supported by IE6. This one may work but you probably want the first one.