A Shopify store owner is experiencing an issue with their custom header navigation hover effect. The hover styling works correctly, but it also triggers on the active/current page, which should remain unaffected with black text.
Problem Details:
Custom CSS was added to base.css for hover effects
The active page incorrectly displays the hover state
Screenshots show the unintended behavior on the navigation menu
Store URL and password provided for troubleshooting
Proposed Solutions:
Three community members offered CSS fixes:
JavaScript approach: Add code to theme.liquid above the </body> tag to prevent hover on active items
CSS targeting: Modify .header__menu-item:hover .header__active-menu-item selector to set white color with !important
All solutions include code snippets and one includes a result screenshot. The issue remains unresolved as the original poster hasn’t confirmed which solution worked.
Summarized with AI on October 28.
AI used: claude-sonnet-4-5-20250929.
Is someone able to help me with one small error in my header navigation button hover effect that I have just coded?
It looks how I want it, except that I do not want the active page to trigger the hover effect, the text is also black in the active page. Is someone able to help me add something to my code in base.css to fix this?
See attached screenshots. Thank you very much in advance.