WordPress.org

Forums

Style Author Comment and not it's thread (6 posts)

  1. greg9885
    Member
    Posted 5 years ago #

    Here's my problem... I'm trying to style an author comment, but only the <li>. I have threaded comments and when I apple a different background color to the li, then every comment's background in that thread gets changed. I tried this: ul.commentlist li.comment-author-admin.depth-1 {background:#252525;} but it's not working??

    Any ideas?

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Assuming by "author", you mean the post's author, try styling on ul.commentlist li.bypostauthor.

  3. greg9885
    Member
    Posted 5 years ago #

    Yes, I do mean post author... and .bypostauthor does the same thing

    Any other suggestions?

  4. esmi
    Forum Moderator
    Posted 5 years ago #

    You probably need to add another CSS block to re-style the children of ul.commentlist li.bypostauthor or use something like ul.commentlist > li.bypostauthor.

  5. greg9885
    Member
    Posted 5 years ago #

    I'm trying, the the background color just overrides the background color of the child since it's all technically inside li.

    What about the depth-1 class? Can I say something like: if depth is 1 and commented by author, then display like this...

    That's what I tried to do with ul.commentlist li.comment-author-admin.depth-1, but no luck

  6. greg9885
    Member
    Posted 5 years ago #

    So is there any other class I should be using?

Topic Closed

This topic has been closed to new replies.

About this Topic