Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] Change Background Color based on Category Name (http://forum.bytesforall.com/showthread.php?t=8207)

tjwhitejr Jul 16, 2010 08:52 AM

[SOLVED] Change Background Color based on Category Name
 
I have set up a blog aggregator that has left (blue) and right (Red) blogs. http://www.olddominionblogs.com and I would like to have the background color to be either red or blue depending on the category of the blog. (Well, pink and light blue.) I have labeled the syndicated blogs with 2 categories each, one lefty or righty and the other category is the blog name.

Anyone know if this can be done? And if so, how?

juggledad Jul 16, 2010 10:12 AM

Do you mean you want the backrounnd of the post to be red or blue depending on the category?
You could do that with CSS
HTML Code:

.post.category-red {background: red;}
.post.category-blue {background: blue;}


tjwhitejr Jul 16, 2010 10:54 AM

Perfect. Small change to use correct category names and used hex colors to get readable shades.

Used:

.post.category-leftyblogs {background: #FFB6C1;}
.post.category-rightyblogs {background: #E0EEEE ;}

Thanks!


All times are GMT -6. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.