Support » Themes and Templates » CSS Styling for Comments; combining classes

  • I want to style the author comment in a different color. My trouble is styling the small css style. I was trying to combine two classes: the li.authorcomment plus the .commentlist small. Here is my code that I added to the comments.php.

    <li class="<?php if ( $comment->comment_author_email == get_the_author_email() ) echo 'authorcomment'; else echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">

    and this is the styling:

    .commentlist {padding-left:30px;}

    .commentlist p {font: 1.2em Georgia, “Times New Roman”, Times, serif;}

    .commentlist blockquote {color:#76767a; background:#f2f2f2;padding:6px 14px;margin:18px 35px;border-right:1px solid #DDD; border-bottom:1px solid #DDD;}
    .commentlist li {margin: 15px 0 3px;padding: 8px 15px 10px 15px;background:#f2f2f2;border-top: 1px solid #ddd;}

    #commentform small {background:#FFF;font-weight:bold;padding:0;}

    .commentmetadata {display: block;}

    .commentlist small {background:#e9e9e9}

    .commentlist cite {font: 1.6em Georgia, “Times New Roman”, Times, serif;font-weight:bold;letter-spacing:-0.05em;}

    li.authorcomment { background-color: #eef5e1;}
    li.authorcomment .commentlist small {background:#BAD685;}

  • The topic ‘CSS Styling for Comments; combining classes’ is closed to new replies.