Jump to content

Changing the logo and menu navigation colour on product details page

Go to solution Solved by tuanphan,

Recommended Posts

Hi everyone, I want to change the colour of my logo (have a separate image for a black logo) and the colour of the top menu navigation items (Home, Portfolio, Workshop etc.) on all the product details page from white to black. Note that I don't want it to affect my product list page when someone opens it. 

I also want the same effect on mobile -> the hamburger icon for phone for all the pages is white, but it should be black for the PDP pages. 

Can you please tell me how to do it with CSS? I tried a few codes from the forum but none of them seemed to work.

 

URL: https://bluebird-tuba-waaw.squarespace.com/

Product page example: https://bluebird-tuba-waaw.squarespace.com/prints/p/coexistence

Link to comment
  • Replies 3
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Add this code to Website Tools (under Not Linked) > Custom CSS

[class*="type-products"].view-item {
	/* change logo to black */
    header#header img {
        filter: brightness(1) invert(1);
        -webkit-filter: brightness(1) invert(1);
    }
    /* change nav to black */
    div.header-nav-item>a {
        color: black !important;
    }
    /* change burger to black */
    div.burger-inner>div {
        background-color: black !important;
    }
}
[class*="type-products"].view-item.header--menu-open div.burger-inner>div {
    background-color: white !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
8 hours ago, tuanphan said:

Add this code to Website Tools (under Not Linked) > Custom CSS

[class*="type-products"].view-item {
	/* change logo to black */
    header#header img {
        filter: brightness(1) invert(1);
        -webkit-filter: brightness(1) invert(1);
    }
    /* change nav to black */
    div.header-nav-item>a {
        color: black !important;
    }
    /* change burger to black */
    div.burger-inner>div {
        background-color: black !important;
    }
}
[class*="type-products"].view-item.header--menu-open div.burger-inner>div {
    background-color: white !important;
}

 

Thank you @tuanphan, that worked smooth! 

One follow up question: since it inverted the color of the logo, there is a red dot in my logo which became black. I have a separate dark logo already, is there any way to include that (by uploading separately) in the logo so that the red dot stays as it is? 

Link to comment
On 11/28/2023 at 12:26 AM, dipanjanpal said:

Thank you @tuanphan, that worked smooth! 

One follow up question: since it inverted the color of the logo, there is a red dot in my logo which became black. I have a separate dark logo already, is there any way to include that (by uploading separately) in the logo so that the red dot stays as it is? 

You can replace it with new logo file by replacing this code

header#header img {
        filter: brightness(1) invert(1);
        -webkit-filter: brightness(1) invert(1);
    }

to this

header#header img {
        content: url(https://cdn.pixabay.com/photo/2023/11/14/15/46/nikon-8388022_1280.jpg);
    }

replace Pixabay with new image url

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.