• Resolved neverhurry

    (@neverhurry)


    Hi there,
    I have successfully set indent to every paragraph, but now there comes a new problem: I would like no indentation for the first paragraph. 🙂 I have searched and searched, and found only one article related to it, but it doesn’t work with twenty twelve theme I am using. Any ideas? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • div p:first-child {
    text-indent: 0;
    }

    If you add that rule to your CSS it might work. This uses the first-child selector which applies to any <p> element that is the first child of a <div>. It wouldn’t work if your paragraphs are nested in a different element such as <article>

    If it works and is useful and you don’t use a child theme, you’ll lose the edits if you update the theme.

    Hope it helps

    Martin

    Thread Starter neverhurry

    (@neverhurry)

    Martin, I tried it but it doesn’t work. Don’t why. I have child theme. Thank you.

    Thread Starter neverhurry

    (@neverhurry)

    Thank you Martin, it works now, maybe I didn’t clean the cache. Cheers!

    Glad it helped.

    You could mark this thread as resolved now.

    ATB

    Martin

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘No indentation to first paragraph’ is closed to new replies.