Support
Support » Theme: Twenty Twenty-One » Overriding active link styling in header navigation
(@justadandak)
2 weeks, 3 days ago
Hey good humans – have a couple of links in my header navigation menu that are anchor point to other sections on the home page.
These links are underlined and would like them not to be (unless hovered like the other links) – is there a way to do that please?
Thanks in advance for your help!
The page I need help with: [log in to see the link]
(@macmanx)
Volunteer Moderator
Each menu item has its own class, so you can use that to target the links you want to change.
For example, this is for removing the underline on the Clients item:
#menu-item-34529 a { text-decoration: none; }
That’s superb – thank you @macmanx – is there anyway of keeping the hover underline (although think it’s dotted) active though?
Yep, try this:
#menu-item-34529 a:hover { text-decoration: underline; }
2 weeks, 2 days ago
Finger guns to @macmanx and deep waist bows – appreciated!