Fixing the Shopify Dawn Theme's Mobile Menu Glitch: Overlapping 'X' Icon Explained
Hey there, fellow store owners! Ever logged onto your Shopify store from your phone, clicked that familiar hamburger menu icon, and found something… a little off? You know, those tiny visual glitches that can make your otherwise beautiful store look unprofessional? Well, you’re definitely not alone. The Shopify community is a treasure trove of insights for these exact moments, and I recently stumbled upon a thread that perfectly illustrates this, tackling a very specific but frustrating mobile menu issue in the popular Dawn theme.
Our friend @filials posted about a perplexing problem: on their mobile site (using the Dawn theme, no less!), the ‘X’ icon meant to close the hamburger menu was appearing on top of the menu icon itself, even when the menu wasn’t open! Talk about a visual hiccup. They even shared a screenshot, which really helped everyone grasp the issue:
This is the kind of detail that can really impact a customer’s first impression, especially since so many shoppers are browsing on their phones these days.
Right away, other community members jumped in. @Custom-Cursor hit on a very common culprit: “This usually happens when custom CSS or JavaScript is affecting the menu toggle, Have you recently made any code changes to the Dawn theme?” This is always the first question to ask yourself when something suddenly looks off. Did you install a new app? Tweak some code? Even minor changes can sometimes have unexpected ripple effects.
Interestingly, later in the thread, @devcoders checked @filials’s site and observed that the issue seemed to be resolved! This is a great reminder that sometimes, simply asking the question or letting the community look at it can lead to a fix, or perhaps the original poster found a solution on their own before the thread fully played out. But for those still grappling with it, the community didn’t stop there, offering some fantastic actionable advice.
The Direct CSS Solution: Hiding the 'X' When Not Needed
The most direct and widely applicable solution for this specific overlapping ‘X’ issue came from @Moeed. The problem, as @Moeed diagnosed, is that the ‘X’ (the close icon) is visible even when the menu is in its ‘closed’ state. The key is to hide it until the menu is actually expanded. This is done by targeting the menu icon’s state using CSS.
Here’s how @Moeed suggested fixing it, which is a classic example of a quick CSS tweak making a big difference:
Step-by-Step Instructions:
- Go to your Shopify Admin.
- Navigate to Online Store > Themes.
- Find your current theme (likely Dawn) and click Actions > Edit Code.
- In the theme editor, locate the
theme.liquidfile under the ‘Layout’ directory. - Scroll to the very bottom of the
theme.liquidfile and add the following code snippet right above the




