Hi, Can I add customized CSS style to certain categories? The instruction for Customized CSS from the theme panel stated that the style will be used on all pages, but I only need it for certain categories. What would be the solution? Thanks very much!
Hi,
You can create your code so it applies only on the category pages you want. You can use the unique category IDs to make the code more specific. If you inspect a category page, it can be seen that the ID is displayed as a class on the body
– https://www.screencast.com/t/yyqt6YccQ
So you can create your CSS code based on this ID. Here is more information about using the browser inspector
– https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/
In this example I have changed the color of the category description, only for a particular category page
– https://www.screencast.com/t/xXCx8f7ojg
Thanks
Hi Simion
In your example above the screen grabs are no longer available but I think this is what I am after, can you please confirm.
Can I depend on the id highlighted in this screenshot: https://snipboard.io/X5KwxV.jpg to apply style only to a specific category?
What I would like to do is to set the color of the page title based on category.
thanks
Hi Calin, thanks for your response.
I’ve created tagdiv cloud template for my category pages and I would like to set the color of the title on the pages based on the category. My hope is I can do this through css and not have to create a separate template for every category.
Brad.
Hi thanks for your help with this.
https://island3.ulusolutions.com/
Categories: Parenting, Things To Do, Family Media
cheers
B.
Hi,
If you want to apply the background color only category pages, for category tags, then you can use the options from theme panel (without cloud template) -> https://i.imgur.com/qnC5aS2.png -> https://i.imgur.com/XxPH980.png if you are using a cloud template, you need to check the settings for style set on the category siblings -> https://i.imgur.com/199rSph.png
Now to change the page title color from each category you need to use a code like this -> https://i.imgur.com/MZea8V1.png for the above categories, you can use this custom css
.category-30 .tdb-title-text {
color: red;
}
.category-31 .tdb-title-text {
color: pink;
}
.category-32 .tdb-title-text {
color: green;
}
You can change the color, also you need to set the code in Theme Panel> Custom code> Custom css -> https://i.imgur.com/rDxfsI0.png
Hope this will help you!
Thank you!