Forums

  • # March 12, 2010 at 8:46 am

    Hello everyone,

    I am trying to make one of those snazzy drop caps for my sidebar column, but I find it tricky to get it to look the way I want.

    p:first-letter kind of does the trick but instead of targeting all the first letters of paragraphs, I would like only the very first one to be larger. This is what my html looks like:

    Code:

    My column

    Lorem ipsum…

    Lorem ipsum…

    Is there a way to target the first letter of my first text paragraph?
    I know the code is pretty stupid with the p wrapping the image, but it’s WordPress generated and the person who is going to use is doesn’t know html so I would like to find a way without having to edit the code every time the column is updated.

    Any ideas?

    Emma

    # March 12, 2010 at 3:28 pm
    Code:
    .column p:first-child:first-letter
    # March 12, 2010 at 3:29 pm

    or since the second paragraph looks like the first "text" paragraph:

    Code:
    .column p:nth-child(2):first-letter
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag