css for categories

I hope someone can help I would like to apply different colours for different categories and their respective posts, with the news category I have only partially succeeded, I THINK! - overall I’d like to give the links etc and the back ground different colours - I have created a child theme but are now stuck as it seems that the body background on an individual post changes however not in the body just behind the featured image on that post… I hope this makes sense.


With current setup you won’t be able to change the color for entire article unless you target specific page/post ID. You are now targeting article element which is only part of it, so changes are not applied to the entire content area.

Other options is to use get_the_category or some other workaround to get category ID along the <div id="content" class="main-content-inner col-sm-12 col-md-8 "> so you can style it much easier using category ID.