For example:
p + p {
/* Some declarations */
}
I don’t know what the + means. What’s the difference between this and just defining a style for p without + p?
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.
See adjacent selectors on W3.org.
In this case, the selector means that the style applies only to paragraphs directly following another paragraph.
A plain
pselector would apply the style to every paragraph in the page.This will only work on IE7 or above. In IE6, the style will not be applied to any elements. This also goes for the
>combinator, by the way.See also Microsoft’s overview for CSS compatibility in Internet Explorer.