menu text color change when overlapping with images
-
Hi there,
I’m working on a minimalistic website. Here’s a link to the draft:
https://lightpink-nightingale-503473.hostingersite.com/projects/
While the website is quite simple, I’d like to add a special effect. Specifically, I want the menu text to turn white when it overlaps with images or project thumbnails while scrolling.
I’ve searched through the forum for solutions and found similar entries—such as those explaining how to change menu text color based on the row background colors. I attempted to use the same principle, but instead of assigning the custom class to a row, I applied it to the project thumbnails or images. Unfortunately, it didn’t do anything.
Ideally, I’d also like to extend this effect to the site title and potentially other normal text elements.
Any advice or suggestions would be greatly appreciated!
-
for menus:
.laynav desktop-nav{ mix-blend-mode: difference; }
Enter this css in "lay options" -> "custom css & html" -> "custom css for desktop"
but you have to use a white color font for your menu items.
in customize → menu style → primary menu → text colorand possibly in
in customize → menu style → menu point active → text color
in customize → menu style → menu point mouseover → text color -
for site title:
.sitetitle{ mix-blend-mode: difference; }
and you need to set the site title to white font too!
I think if you had a black background website maybe you need to set the texts to black not sure about that!
-
Hi Armin, thanks for the reply!
I get a message when I paste the code: "Unknown property: mix-blend-mode"
Does it mean then that the menu text will automatically change to black while scrolling down when it overlaps with the background instead of the project thumbnail or an image? Or do I need to add some extra custom CSS and assign class to a row for instance?
-
the code for the editor is just so old, it doesnt recognize that css as valid css
no extra css is needed
the color will always depend on whats beneath the text
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it