How to top margin from first <p> paragraph after <h2>? and if any h2 comes after p then either p should not have bottom margin or h2 should not have top margin
I have
h2
p
h2
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.
Use this:
+is theadjacent sibling selector. It’s supported in IE7+ and all modern browsers.
Using
+again in exactly the same way..You can even combine them: