Remove text-decoration on submenu hover + active section

Topic summary

Goal: Remove underline (text-decoration) from Dawn theme navbar when a submenu item is hovered and when a parent section (or any of its subsections) is active.

Context: The underline was already removed on main links, but persisted on dropdown sublinks and on active states. A store preview link and a screenshot were shared for reference.

Proposed fixes:

  • Add custom CSS in theme.liquid (before ) to target submenu hover and active states and remove text-decoration.
  • Alternative: Add CSS in base.css using selectors like summary.list-menu__item a and details[open] > .header__menu-item, initially suggested with !important.

Outcome: The first CSS approach resolved both issues. The author confirmed it works and that !important was not necessary.

Status: Resolved. No further action needed. The alternative base.css solution remains a valid option if needed.

Summarized with AI on December 28. AI used: gpt-5.

Hello,
I’m trying to customize the navbar in Dawn theme a bit with some CSS and I’m currently facing 2 problems.
I managed to customize the hover and active section of the standard links, but I have issues to do the same on the links with dropdown, as can be seen on screenshot below.

1st problem: I wanna get rid of the text-decoration when the section or any of the subsections is active.
2nd problem: i wanna get rid of the text-decoration when you hover over any of the subsection item (I managed to get rid of the text-decoration when you hover directly over the main link, but when hovering the sublinks it still creates the underscore)

Link to the eshop is https://7c6b10-4.myshopify.com/

Any help is appreciated.

Thank you,
Jan

1 Like

Hi Empres, alright, how are we going to do it? :grinning_face:

Hello @Jankko ,

I understand you are looking to remove the underline on the navigation menu when users hover over submenu items or active page menu items.

To remove the underline, in the hover submenu case, you can use the below-mentioned code.

→ Add the code at the bottom of the theme.liquid file before tag and save.


In another issue, please use this code -


I hope the code helps you.

Thank you.

Hi @Jankko

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > base.css and paste this at the bottom of the file:
summary.list-menu__item a {
text-decoration: none!important;
}
details[open] > .header__menu-item {
text-decoration: none !important;
}

Thank you Anshul, this actually worked, I didn’t even need to use the !important tags as it seems as quite an overkill.

Hello @Jankko ,

Yes, you’re right.

Thank you for accepting my solution, please also liked by solution.

It will be highly appreciated.

Thank you.