Home › Forums › Weaver Xtreme Theme › How to make an Unclickable Menu Item Text change color when hovering?
- This topic has 7 replies, 3 voices, and was last updated 2 years, 6 months ago by
scrambler.
-
AuthorPosts
-
February 17, 2024 at 17:37 UTC - Views: 43 #73924
miamax
ParticipantIn order to have two particular menu items unclickable, I created custom links in Menus:
URL: #
CSS Classes: unclickableand then placed this code in Custom CSS / Global CSS:
.unclickable > a {
pointer-events: none;
}https://www.dwellinthegarden.com/pickfair/
It works. “Boot Trays & More” and “Gifts For Gardeners” now are non-clickable.
But now I want the text to change to “white” upon hover.
You can see that “Needlepoint Belts” (which is clickable) changes to white upon hover.
I want “Boot Trays & More” and “Gifts For Gardeners” text to change to white on hover.
I tried placing this code in Custom CSS global:
.unclickable > a {
pointer-events: none; hover color: #FFFFFF;
}That doesn’t work.
Is there a way to do this?
Thank you.
February 17, 2024 at 17:45 UTC - Views: 43 #73925User
ModeratorCan’t test it here, but does
.unclickable > a { pointer-events: none; } .unclickable > a { hover color: #FFFFFF; }Work?
Regards!
February 17, 2024 at 18:02 UTC - Views: 38 #73926scrambler
ModeratorThe rule for hover would have been
.unclickable > a:hover {color:white;}
Put the pointer event none disable that setting.
I will look in another way to disable the link
February 17, 2024 at 18:09 UTC - Views: 38 #73928scrambler
ModeratorHere the proper way to do it
How to Make a Non Clickable Menu Item in WordPress – JoshHall.co
Basically create a new menu item with URL #
Then on the right side where the new menu item appears with all its options opened, remove the # from the URL box
February 17, 2024 at 20:22 UTC - Views: 23 #73929miamax
ParticipantThis did not work to change the text color when hovering:
.unclickable > a {
pointer-events: none;
}
.unclickable > a {
hover color: #FFFFFF;
}This did not work, either:
.unclickable > a:hover {color:white;}
But this works, from the JoshHall.co link you gave me:
.unclickable > a:hover {
cursor: default !important;
}Yay!
Thanks so much for your responses!
February 18, 2024 at 02:04 UTC - Views: 16 #73930scrambler
ModeratorWould be so much easier and cleaner to follow the proper method I referenced for non clickable items ๐
February 18, 2024 at 16:43 UTC - Views: 12 #73931miamax
ParticipantBut that’s exactly what I did, and it works!ย ๐
(Someone had posted the CSS in JoshHall.co comments.)
February 18, 2024 at 16:59 UTC - Views: 10 #73932scrambler
ModeratorNo the easiest way was to simply remove the URL from the menu item in Appearance > Menu
-
AuthorPosts
- You must be logged in to reply to this topic.

