One of my client's site has a blue underline when we hover on the menu item. As the client added a sub-item to the "Services" menu item, the underline under the services menu item started appearing without even hovering. I want the line to appear only when the user hovers on the menu item. Here's the site URL.

More Information

Wordpress default menus are being used.
Check the other menu items, when you hover only then the line appears. When I inspect the element, as I remove the "current-menu-ancestor" subclass from this menu item it starts working perfectly as I want. How can I remove this class? Or any alternative solution?
I have tried removing the "current-menu-ancestor" subclass from the theme's style.css file but it has no effect. The theme being used is "Salient" Wordpress theme.

1 Answer 1


.nav-menu .current-menu-ancestor > a {text-decoration:none} will help. Alternatively, use .nav-menu .current-menu-ancestor > a {text-decoration:none !important;}. Please change the .nav-menu with the class name that you have used

Please let me know if it works.

  • Thank you but I solved the issue myself. It was due to some issues with the link which was added to the sub-items of the menu. Commented May 25, 2018 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.