Is there a way I can get the colour to be the category colour? So that the colour matches each category?
The body has a class for each category eg .category-cynfal-hydro .category-139
Can I use that to assign a different colour to .nectar-recent-post-slide ?
Or might it be possible to call the category colour with a css variable? (The meta-category span that names the category above each post is coloured with the category colour).
Hello,
Is there any way I could use the post category colour or custom css to put an overlay fade on the post category banners?
I'd like to do the red fade from the homepage
saveourrivers.org
on the header image for
saveourrivers.org/campaigns/tumpen/
Can you think of a way to do that?
Regards,
Peter
Hi Peter,
Use the following custom css:
Hope this helps.
Thanks for the speedy reply Andrew!
Is there a way I can get the colour to be the category colour? So that the colour matches each category?
The body has a class for each category eg .category-cynfal-hydro .category-139
Can I use that to assign a different colour to .nectar-recent-post-slide ?
Or might it be possible to call the category colour with a css variable? (The meta-category span that names the category above each post is coloured with the category colour).
Regards, Peter
To hopefully make that clearer ... each of these three categories has a colour assigned ... blue, purple and red.
Can I get the colour fade on .nectar-recent-post-slide to reflect that colour rather than all be the same?
http://saveourrivers.org/campaigns/heart-of-kendal/
http://saveourrivers.org/campaigns/cynfal-hydro/
http://saveourrivers.org/campaigns/tumpen/
Hi Peter,
Sorry for the late response
Yes. you can use the category class at the body to uniquely have different category colours.
Kind regards,
Sorry for my lacking CSS knowhow ... I tried
body.category-tumpen .nectar-recent-post-slide .nectar-recent-post-bg:after, body.category-tumpen .single [data-post-hs="default_minimal"] .page-header-bg-image:after, body.category-tumpen .archive .page-header-bg-image:after {
background: linear-gradient(rgba(246,101,60,1), rgba(246,101,60,0));
}
Tying to select the category header only if it's within body of class 'category-tumpen' (also known as .category-162)
But now the gradient doesn't appear at all.
Can you tell me how to select the header based on the class of the body?
Regards, Peter
Hi Peter,
The following css will work on the following link http://saveourrivers.org/campaigns/tumpen/
Kind regards.
Brilliant! Thank you so much for your help Andrew!
Everything is working as I hoped now.
Peter
Hi Peter,
Glad that help. Feel free to reach back should you need help.
Thanks.