Site logo

[Resolved] Change Product Background Colour

Home Forums Support [Resolved] Change Product Background Colour

Home Forums Support Change Product Background Colour

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2592178
    Mohammed

    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!

    #2592396
    David
    Staff
    Customer Support

    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.

    #2593511
    Mohammed

    Hi, it doesn’t seem like it changed anything. Are you able to kindly take a look please.

    #2593519
    Leo
    Staff
    Customer Support

    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 🙂

    #2593533
    Mohammed

    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.

    #2593560
    Leo
    Staff
    Customer Support

    Can you disable all plugins except for GP premium and WooCommerce then?

    #2593597
    Mohammed

    Yes done. I still don’t see any changes reflecting. I disabled them one by one and have left them all off.

    #2593599
    Mohammed

    Added WP login credentials

    #2593620
    Leo
    Staff
    Customer Support

    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/

    #2593633
    Mohammed

    Thank you so much!

    #2594919
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.