CSS for specific collection/category?

WajeehRehamn
Tourist
9 0 4

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?

KetanKumar
Shopify Partner
19209 2014 7091

@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.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
WajeehRehamn
Tourist
9 0 4
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
KetanKumar
Shopify Partner
19209 2014 7091

@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 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
WajeehRehamn
Tourist
9 0 4
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.
0 Likes
KetanKumar
Shopify Partner
19209 2014 7091

@WajeehRehamn 

oh can you please give rough idea to screenshot?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
WajeehRehamn
Tourist
9 0 4

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.

Screenshot (28).png

Screenshot (27).png

  

0 Likes
WajeehRehamn
Tourist
9 0 4

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?

KetanKumar
Shopify Partner
19209 2014 7091

@WajeehRehamn 

yes you can just add id #sale and appy css code 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
WajeehRehamn
Tourist
9 0 4

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.

0 Likes