Alternate Your Comment Colors

March 8th, 2010


Effectively styling comments can be a difficult task. One tip to make your comments more readable is to alternate their background colors.

By default, WordPress assigns a class of “even” or “odd” to each comment in the list; the first is odd, the second even, the third odd, etc, etc.

So, to achieve the desired effect, put this in your style.css:

li.even	{
	list-style: none;
	background: #FFFF;
}
li.odd	{
	list-style: none;
	background: #F9F9F9;
}

Add in a few other styling elements, such as borders and clever margins, and you can get some really slick results.

About Me

Pippin Williamson is a freelance web designer / developer that has a sometimes unhealthy addiction to coffee and Wordpress.

He builds custom wordpress themes that are specialized for Content Management.

Read more about Pippin.

2 Responses to “Alternate Your Comment Colors”

  1. April 25, 2010 at 4:09 pm

    Hello my friend

    How to make comment links DoFollow ?

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">