Custom Menu Color (for different pages)
-
Try this for an active menu item:
body[data-id="66"][data-type="page"] nav.primary .current-menu-item span { border-bottom-color: pink; }
Or this for all menu items:
body[data-id="66"][data-type="page"] nav.primary a span { border-bottom-color: pink; }
Does that work?
For general info on how to find the selectors please check this: https://developer.chrome.com/devtools
and especially https://developer.chrome.com/devtools#dom-and-stylesA little primer in CSS is useful as well: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started
:+1:
-
is the same thing also possible for the mobile menu?
-
Well sure. I think with the links I provided to you, you can find out how that works. Your CSS needs to go into the "Custom CSS for Mobile Version" field ^^
I think probably the same CSS works for the mobile version if you just copy paste the CSS into the "Custom CSS for Mobile Version" field.
-
Hey!
In the latest Lay Theme Version you can set the background color of pages directly in the gridder. No more extra CSS needed. :) -
Hey Armin, i tried to use the same code for the mobile version, but it doesn't work… Is there also a way to change the background colour of the navigation for pages/projects in the mobile version? thanks a lot! !
-
Hey Max! Well I'm gonna do a customization of your Lay Theme version anyway, so you can put that on the todo list.
-
I also tried modifying the menu/burger for the mobile version. Is there no way I can do it myself?
I tried it but it didn't work... -
Hey Armin, I changed my original concept, so that I can do the stuff myself… the only thing left is the bg colour for the mobile version menu…
-
Ok! I just tried this CSS, it works. Put it into Lay Options -> Misc Options -> Custom CSS for Mobile Version
.navbar { background-color: #0f0!important; border-bottom: 1px solid #00f!important; } nav.primary li a { color: #0f0!important; } nav.primary li { background-color: #f00!important; border-bottom: 1px solid #00f!important; } nav.primary li.current-menu-item { background-color: #00f!important; }
-
cool, thank you!
I'll try it out -
btw is there also a code that enables the burger color to be different?
-
.burger span { background-color: #000000; }
Going to make Customizer settings for all of this one day :D
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