Archived topic
Change title background color in specific category?
3 replies · Started by Are Martin on May 21, 2015
I´m trying to change the background color (and also content background color) of the post title in a specific category with no luck. This is the CSS code I tried to use. The category-id is 108
.category-108 .single .entry-title {
background: #f7f7f7;
}
What am I doing wrong here?
Thankful for help!
Are Martin Kallåk
So close! The category class and .single class are both a part of the <body> element, so it would be:
.category-108.single .entry-title {
background: #f7f7f7;
}
Could I make all post title backgrounds the same color regardless of category with a similar code?
For sure!
If you're targeting the post title on single posts:
.single .entry-title {
background: #f7f7f7;
}
If you're targeting all posts titles (pages, posts etc..)
.entry-title {
background: #f7f7f7;
}
