- This topic has 9 replies, 3 voices, and was last updated 5 years, 7 months ago by
Leo.
-
AuthorPosts
-
October 1, 2020 at 7:11 pm #1468296
Edwin
Hi
Is there a way to change the color of the logo and menu in the sticky menu when you scroll down and it sits on white or black color background.
Here is an example:
When you scroll down the menu and logo changes color when the background is different.
Thanks
Edwin
October 1, 2020 at 7:14 pm #1468302Leo
StaffCustomer SupportHi there,
Are you using a merged header element by any chance?
Let me know 🙂
October 1, 2020 at 7:39 pm #1468319Edwin
Hi Leo
I am using the Off Canvas Panel menu.
October 1, 2020 at 7:46 pm #1468324Elvin
StaffCustomer SupportHi Edwin,
Your site seems to be in maintenance mode. Can you give us access so we could inspect the site?
You can add the site details on the Private Information text area.
Thanks.
October 1, 2020 at 8:23 pm #1468354Edwin
Hi Elvin
Try now. I removed the Maintenance mode
October 1, 2020 at 8:42 pm #1468366Leo
StaffCustomer SupportYou are using a merged header element so you can actually set the transparent colors for the static header and navigation within the element under the Site Header tab:
https://www.screencast.com/t/tW6PQaAXThen the sticky navigation color would inherit the colors set in the customizer.
The result should be similar to this:
https://docs.generatepress.com/article/navigation-as-a-header/#different-logo-and-navigation-colorsLet me know if this helps 🙂
October 1, 2020 at 9:44 pm #1468410Edwin
Hi Leo,
Thanks, but what i am after is that the color of the menu and logo changes when the background of the color change.
You can see it in the website https://ajandco.com.au/ when it is on top of white background the color of the logo and menu is black and when you are on black background (scroll in page) the menu and the logo is white.
October 1, 2020 at 10:53 pm #1468460Elvin
StaffCustomer SupportThis is pretty tricky to do.
Your reference site is pretty complex since it uses scripts to control how the hamburger icon changes.
This is doable w/ CSS though.
Try this CSS code:
nav{ mix-blend-mode:difference; } button.menu-toggle{ background-color: transparent; transition: background-color 0.3s; } button.menu-toggle > span.icon-menu-bars{ color:white; }We’re basically taking advantage of CSS’s mix-blend-mode property as opposed to your reference site’s script controlled swapping headers.
October 1, 2020 at 11:03 pm #1468467Edwin
Thanks Elvin.
That didn’t work. I guess i will have to try it with JavaScript?
October 2, 2020 at 8:23 am #1469315Leo
StaffCustomer SupportThis kind of custom solution is out of the scope of this forum unfortunately.
I think the logo part would be very complicated to achieve.
You could try hiring a developer using a service like this:
https://codeable.io/ -
AuthorPosts
- You must be logged in to reply to this topic.