I’m trying to add a little space in between the submenus (not sure they are called like that) but basically, I would like to add some padding in between the different items to make it easier to read.
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:
To add some space between the submenu items on your Shopify store, you’ll want to adjust the padding or margin in your theme’s CSS. Here’s how to do that:
Add Space Between Submenu Items1. Go to Shopify Admin:
Navigate to Online Store > Themes.
Click Actions > Edit Code on your active theme.
Locate the CSS File:
Open theme.css, base.css, or another main stylesheet (the name depends on your theme).
Add the Custom CSS: Add this code at the bottom of the file:
/* Add space between submenu items */
.site-nav__dropdown li {
padding: 8px 0; /* Adjust value to control spacing */
}
Save and Preview:
Click Save and refresh your store to see the changes.
Adjust the 8px value as needed to increase or decrease the space.
If It Doesn’t Work:1. Inspect the Element:
Right-click on a submenu item and select Inspect (or Inspect Element).
Find the class applied to your submenu items. If it’s different, replace .site-nav__dropdown li with the correct class.
Add More Specificity:
If other styles are overriding your changes, increase specificity:
nav .site-nav__dropdown li {
padding: 8px 0 !important;
}
Easier Way with EasyEdits
I’m the developer of EasyEdits—a Shopify app that lets you customize your store’s design without touching code. It’s free to try, and you can keep your changes even if you don’t subscribe.