I found this little trick a while ago which alternates the style of your wordpress comments. I’m basing this tip off of the default wordpress comments.php file, but it shouldn’t be too different for any other theme. The default comments.php file actually comes with a built in solution for alternating comment styles, but I was never fond of their way of doing it, so I looked for a different way.
First, locate the following line of code in the comments.php file:
<?php foreach ($comments as $comment) : ?>
Before that line add:
<?php $i = 0; ?>
and after it add:
<?php $i++; ?>
Below the pieces of code you just added, you should see a list item tag (<li>) that looks something like this:
<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
Replace that line of code with this:
<li class="<?php echo($i&1)?'oddBg':'evenBg' ?>
Now you can open up your stylesheet and add styles to the oddBg and evenBg classes.
You do this same effect for your wordpress posts, but I’ll leave that up to you to figure out.
If you have any questions or suggestions, feel free to leave a comment or send me an email.

