I need to target specific collection in my store.
For example I want to show the sale tag on those products which are in the sale category. So that when we click on the sale category product it goes to the product page and I want that it also shows the sale tag.
My question is if we have many categories in collection how can we target specific category to change its CSS?
1 Like
@WajeehRehamn
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community! 
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
https://www.jwnshop.com.au/
When you go the sale collection a badge will appear on those products but
when you open that product the badge disappear. I want to show sale badge
only on the product which we add on sales collection.
My Question is how to define css for the sales collection /category products
Thanks
1 Like
@WajeehRehamn
sorry but i can’t see sale collection product
also you can try only sale collection page css just try this for example this
#sale .site-wrapper {background: red;}
your add parent id #sale after your child div or element you apply css
Yes i have done that but when i open the product and it goes on the product
page it goes off. I want it to be stayed there.
I hope you understand what I want.
@WajeehRehamn
oh can you please give rough idea to screenshot?
Look when I’m on the sale page the tag is shown. But when i click on that product and go to the product page sale tag goes away. But the thing i want is that the tag only shows on the product to whom i assign the collection-sale.
Even when it’s on the sales page or even when i open the product.
The main thing i want is to show sales tag to the products i assign the collection as sale.
I hope this is more understanding.
Okay to clear it out I just need to know is it possible to define css for specific collections? I know we can target the collection pages. But the changes made to the collection pages stays within the collection page. For example If I change style in sales pages it will only appear in the sales page. If I changes font-color on the sale page so only the sale page font-color will be changed. But when the product from sale page appears anywhere else on the site it will show the default font-color.
Can we define css for specific collections/category?
1 Like
@WajeehRehamn
yes you can just add id #sale and appy css code
Already did that, using #sale id will only apply on sales page. When we will click that product from sales page it will move to the products page and the css we applied on sale page wont effect product page.
@WajeehRehamn
sorry its work only collection page doesn’t work product page sorry
@WajeehRehamn
it’s my pleasure to help us