Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/apsk121/watchtheworld.org/httpat/textpattern/lib/txplib_db.php on line 15
watchtheworld-Alternating Comment Backgrounds

watchtheworld

has not changed for quite some time now

Where am I?

You're visiting an individual article in the blog section of watchtheworld, the personal and only website of Angad Kingra. To know more about him check out the About section.

View the full archive of blog articles here.

Alternating Comment Backgrounds

I found the easiest way ever, on the wordpress forums, no I don’t really lurk there, google took me there.

This guy Cine posted it over at the wordpress support site.

At the top of your page, put <?$i;?>,
then, inside your comments loop, put <div class="<?=($i%2)?"color1":"color2";$i++;?>">.
Then, somewhere in your stylesheet, put
.color1 {background-color: #DBDBDB;}
.color2 {background-color: #EEEEEE;}

Not only can it be used for comments, but loads of other stuff too. I’m working on my own theme in zenphoto so I’ll be definitely using this tip!

9.01.07 Comment

|

Contact | Valid xHTML | Valid CSS | Flickr! | All rights reserved.