Hi, I am trying to make the navigation dropdown menu wider on the Empire v12.2.1 theme so that the listings appear all on one line and not two lines. Any idea how I can do this?
Thank you
Main issue: A merchant wants to widen the dropdown navigation menu in the Shopify Empire theme (v12.2.1) so each menu item stays on one line instead of wrapping to two lines.
Details: They requested guidance on how to increase the dropdown width (e.g., via theme settings or CSS), but provided no code or constraints. A screenshot is attached showing menu items wrapping onto a second line; the image is central for understanding the layout problem.
Status: This is an initial inquiry with no replies or solutions yet. No decisions or action items have been recorded. The discussion remains open, with the key unanswered question being how to adjust the dropdown width in Empire v12.2.1 to keep items on a single line.
Hi, I am trying to make the navigation dropdown menu wider on the Empire v12.2.1 theme so that the listings appear all on one line and not two lines. Any idea how I can do this?
Thank you
Hi @offroadjim
Try to add this line in header or menu sections Custom CSS setting
.site-navigation .navmenu-basic__item .navmenu-submenu {
width: 360px;
}
that should be enough
Hi @offroadjim
I have written custom code to get this done. To do this you will have to edit theme.liquid.
Follow these Steps:
Go to Online Store
Edit Code
Find theme.liquid file
Add the below code just above
<style>
.site-navigation .navmenu-basic__item .navmenu-submenu {
width: 360px;
}
</style>
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Makka
Hi Makka, I pasted this at the bottom of the assets > theme.css.liquid file but nothing changed. Is that the correct spot to paste it?
Thank you that worked!
Is there a way to make the menu centered instead of to the left?
There is a way but I think it is look better left aligned, and you can reduce width if you need. To width of longest menu item.
But here is code:
.site-navigation .navmenu-depth-2 .navmenu-link {
text-align: center;
}
.site-navigation .navmenu-basic__item .navmenu-link-parent, .site-navigation .navmenu-basic__item .navmenu-item-parent {
text-align: center;
}
Thank you… Where do I paste this ?
same place, in header or menu section in your theme customization, So choose, for example Header section and IN Custom CSS setting copy all the code
That one did not work for some reason. I also tried removing the code for the width and just putting in the center code but still nothing
Well, you can copy all to the end of theme.css you have on the screenshot, so just this
.site-navigation .navmenu-basic__item .navmenu-submenu {
width: 360px;
}
.site-navigation .navmenu-depth-2 .navmenu-link {
text-align: center;
}
.site-navigation .navmenu-basic__item .navmenu-link-parent, .site-navigation .navmenu-basic__item .navmenu-item-parent {
text-align: center;
}
But remove that last code from the screenshot, it is completely wrong to use tag there.
Hi, I think I explained it wrong, and I see why you thought it looked better to the left!
I was trying to center the main menu to the header
Ah my bad, sorry
Try this instead of those 3 rules
.site-navigation .navmenu-basic__item .navmenu-submenu {
width: 360px;
}
.site-navigation {
justify-content: center;
}
First rule just for the width of menu items and second for cenering main menu.
That did it… Thank you so much!