How can I increase spacing and add gray lines in a dropdown menu?

Topic summary

A user working with the MODE theme wants to increase spacing between dropdown menu items and add gray separator lines between them, similar to a reference website example.

Solution Provided:

  • Add custom CSS code to the theme’s stylesheet (base.css, style.css, or theme.css)
  • The CSS targets specific navigation tier elements to add padding and bottom borders
  • Initial code creates gray lines under all submenu items

Follow-up Adjustments:

  • User requested removal of the line under the last submenu item
  • Updated CSS provided using :nth-child() selectors to exclude the final item in each dropdown section
  • Code successfully implemented for desktop view

Outstanding Issue:

  • The CSS changes only affect the desktop menu
  • User now needs guidance on applying the same styling to the mobile menu version
  • Discussion remains open awaiting mobile implementation solution
Summarized with AI on November 16. AI used: claude-sonnet-4-5-20250929.

Hi,

I am using the MODE theme. I want to have more space between each subheading on the menu dropdown. I would also like to add a gray line in between them. Here is a picture of an example website that I would like to match. My store is https://olafilter.com

1 Like

Hi @tasmithola

Try this one.

  • From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  • Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  • In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
div#NavigationTier2-3 li,
div#NavigationTier2-2 li,
div#NavigationTier2-1 li
{
    padding: 10px 0px 10px 0px;
    border-bottom: 1px solid gray;
}
1 Like

Hi @tasmithola ,

This is Anthony from Beae Landing Page Builder, and I’m happy to assist you today.

While I acknowledge that this issue falls short of the desired outcome, I have an idea that I believe might be of help:

  1. Go to Online Store → Theme → Edit code
  2. Open your theme.liquid file
  3. Paste below code before :

Best regards,

Anthony

1 Like

Thank you so much!! Do you know how to remove the line under the last sub menu? So that it makes a line under each submenu item except the last one?

1 Like

Yes we can do that, try this one.

Same Instruction.

div#NavigationTier2-3 ul > li:nth-child(5),
div#NavigationTier2-2  ul > li:nth-child(2),
div#NavigationTier2-1  ul > li:nth-child(2) {
    border: none;
}

And Save.

Result:

1 Like

Thanks! You’re the BEST!

I noticed that this change only affects the desktop menu. How do I change this for the mobile menu too?