Archived topic
Change Product Background Colour
10 replies · Started by Mohammed on April 1, 2023
I'm trying to change the background colour for all of the products and change the text/writing from black to white.
https://gehna.ca/product/geet-like-poetry/
I found this article but it threw me off since it was written in 3 parts: https://generatepress.com/forums/topic/change-background-colour-single-product-page/
Thank you!
Hi there,
try this:
.single-product {
--contrast: #fff;
--base-3: #000;
background-color: var(--base-3) !important;
}
.single-product a {
color: var(--contrast) !important;
}
.single-product input {
color: #000 !important;
}
In the first CSS rule you will see --base-3: #000; change the hex color for the background color you want.
Hi, it doesn't seem like it changed anything. Are you able to kindly take a look please.
I'm not seeing David's CSS being added.
Can you clear and disable any caching or optimization plugins you are using?
Let me know :)
Hi, I don't see any caching or optimization plugins installed.
When adding the code I did notice the header and footer text go black on the product pages.
Can you disable all plugins except for GP premium and WooCommerce then?
Yes done. I still don't see any changes reflecting. I disabled them one by one and have left them all off.
Added WP login credentials
The code here is PHP and not CSS:
https://www.screencast.com/t/fsblpemXa
Please remove them from the Additional CSS field.
Learn how to add PHP: https://docs.generatepress.com/article/adding-php/
Thank you so much!
No problem :)