Blog

Alternate Your Comment Colors

Alternate Your Comment Colors

CSS, Tutorials, WordPress Tutorials2 comments

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.

2 Comments
  1. Dat Tai says:

    Hello my friend

    How to make comment links DoFollow ?

  2. There is a handy plugin for enabling this. Check it out here http://www.semiologic.com/software/dofollow/

Leave a Reply