- This topic has 7 replies, 2 voices, and was last updated 3 years, 7 months ago by Leo.
-
AuthorPosts
-
August 28, 2020 at 2:49 am #1421521Fredrik
Hello,
I’m creating a mega menu from the basis of this resource: https://docs.generatepress.com/article/building-simple-mega-menu/
Right now I’m trying to change the fonts/colour of subitems using custom class. Like so,
https://docs.generatepress.com/article/adding-buttons-navigation/But I’m running into some issues.
I’m trying to have my non-clickable custom link subitem not change colour, even on for instance Text Current.
See print: https://prnt.sc/u7dq2lIs it possible to control this?
August 28, 2020 at 8:39 am #1422027LeoStaffCustomer SupportHi there,
Can you make sure to add
#
in the URL field with the non-clickable custom link?
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-linkAugust 28, 2020 at 11:07 am #1422189FredrikHello Leo,
Sure 🙂 I’ve added this.
The “Shop and Categories” is black here.
https://prnt.sc/u7na1nAnd it changes to blue here, because of “Text Current”.
https://prnt.sc/u7na5uWhat I like is the “Shop and Categories” aka “non-clickable custom links” to always be black.
August 28, 2020 at 11:35 am #1422212LeoStaffCustomer SupportCan you try adding a custom class like
always-black
to the non-clickable custom links?
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classesThen we will try some CSS.
August 28, 2020 at 12:00 pm #1422235FredrikHello Leo,
Sure 🙂 I added a new custom class called
always-black
.This is my current CSS trying to control the “Shop and Categories”.
.main-navigation .main-nav ul li.always-black a {
font-weight: bold;
text-transform: uppercase;
color: #000000;But this affects sub-items further down the menu hierarchy and don’t override “Text Current”/blue font colour.
Also, this is a print from Menu back-end:
https://prnt.sc/u7o6hcAugust 28, 2020 at 1:16 pm #1422281LeoStaffCustomer SupportTry edit your CSS to this:
.main-navigation .main-nav ul li.always-black > a { font-weight: bold; text-transform: uppercase; color: #000000 !important; }
August 28, 2020 at 2:18 pm #1422338FredrikHello Leo,
Thanks, I think that did the trick 🙂
I added another class, so now I use
always-black
andalways-grey
in the CSS to control the menu hierarchy..main-navigation .main-nav ul li.always-black > a {
font-weight: normal;
text-transform: none;
color: #000000 !important;
}.main-navigation .main-nav ul li.always-grey > a {
font-weight: bold;
text-transform: uppercase;
color: #999999 !important;
}And I removed the # from my “non-clickable custom links” to avoid mouse on hover. “Text Current” is no longer displayed when clicking down the menu hierarchy. Great!
See print of results,
https://prnt.sc/u7q9nuAugust 28, 2020 at 2:32 pm #1422361LeoStaffCustomer SupportGlad to hear 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.