WordPress.org

Ready to get started?Download WordPress

Forums

styling admin comments (3 posts)

  1. miocene22
    Member
    Posted 3 years ago #

    Hey it's a minor issue but I want to solve it.

    On my theme I have written css to make comments posted by the admin appear differently to other comments. One difference between admin comments and other comments is I want to have a different font color. This has been achieved fine but when an ordinary user posts a reply to an admin comment, their comment also has a different font color. This can be seen here.

    Any chance someone can take a look at the css there and give me an idea. Everytime I think I'm a master of css another thing comes and bites me in the ass. Seems like I need a sort of :first-element psuedo class or someting (tried first-child, no good)

  2. DigitalSquid
    Member
    Posted 3 years ago #

    Remove .comment-body:first-child

    From:

    .comment-author-admin .comment-body:first-child{
    	color: #444;
    }

    And add color:#CEEBEB; to:

    .comment, .pingback, .trackback {
    	overflow: hidden;
    	padding: 10px;
    	background-color: #3f4e4e;
    	margin-bottom: 10px;
    	font-size:14px;
    	-moz-border-radius-bottomright: 15px;
    	-webkit-border-bottom-right-radius: 15px;
    	border-bottom-right-radius: 15px;
    }

    Or you can add the colour to it's own .comment style if you don;t want the pingbacks that colour as well.

  3. miocene22
    Member
    Posted 3 years ago #

    that's great, thanks. Now just the date in the comment-meta. I made the grey slightly darker so easier to read on the lighter background. Now it has applied this style to the replies from other users also so makes it difficult to read the date on them, which have dark backgrounds

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.