nth-child - Post Titles (2 posts)

  1. kdubya16
    Posted 4 years ago #

    I have a custom post type that displays 3 items on the homepage:
    The loop is layed out like this:
    <h3>Title Here</h3>
    <p>Couple sentences here</p>
    What I'd like to do is change each '<h3>' to a different color in each Post.
    The first thing that came to mind is to use 'nth-child', but I can't seem to get it to work.

    I figure if this doesn't work I could target the Post ID, but I'm still not clear on how to target that via CSS.

    Any suggestions are appreciated
    Thanks in advance

  2. Komatsu
    Posted 4 years ago #

    I want to know about this thing too.

Topic Closed

This topic has been closed to new replies.

About this Topic