0

I'm trying to add a dropcap in my Wordpress site, to the first letter of the first paragraph following the H1. I'm using a selector as follows:

h1 + p:first-letter {
font-family:Almendra;
font-size:300%;
etc...
}

Nothing is being selected. If I remove the h1 +, every paragraph's first letter is selected.

My page is here: http://www.thelionscall.com/2012/10/19/forum-testing/

What am I doing wrong?

1
  • 1
    The + is for adjacent sibblings. The h1 and p are not sibblings, the h1 and the div (p's parent) are sibblings. Commented Nov 13, 2012 at 22:11

1 Answer 1

1

The elements are too far apart. Need to either put them in the same parent, or use their containers... this might get you closer:

header h1 + div.entry-meta p:first-letter {
    font-size: 300%;
    /* etc... */
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.