Shopify themes, liquid, logos, and UX
Hi Shopify Community 🙌
I’m working on a customized version of the Dawn theme and have a dropdown menu in the header titled “Hjælp” (Help).
One of the submenu links – “Ofte stillede spørgsmål” (Frequently Asked Questions) – is breaking into two lines because the dropdown menu box isn’t wide enough. I want the entire link to stay on one line.
Here’s what I’ve tried (without success):
#HeaderMenu-MenuList-2 {
white-space: nowrap;
width: auto;
}
I also tried adjusting padding, min-width, and max-width, but the dropdown still doesn’t expand to fit the full text.
The correct element has the ID #HeaderMenu-MenuList-2, confirmed via DevTools. I’ve added the code to base.css and verified it’s saving properly.
How can I make the dropdown menu automatically expand to fit the longest link so nothing breaks onto two lines?
Thanks in advance 🙏
– Benjamin
share your store link
Hi @BenjaminW
Please add this code to Cutom CSS in Online Store > Themes > Customize > Theme settings.
details[open] > .header__submenu {
width: max-content;
}
- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hi @BenjaminW,
Please go to Actions > Edit code > Assets > component-list-menu.css file and paste this at the bottom of the file:
.list-menu--disclosure {
width: 22rem;
}
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025