Mobile Menu Not Working? 7 Causes and How to Fix Them
Updated October 31, 2026
A mobile menu that won't open usually means a JavaScript error stopped its click handler, or another element sits on top of the icon. If it opens but looks wrong, check z-index and overflow on its parent. Open the console at phone width, and fix the first red error before anything else.
Quick diagnosis
- Tapping the icon does nothing: a script error, or something covering the icon.
- The menu opens behind the page: a z-index or stacking context problem.
- The menu appears cut off: a parent with
overflow: hiddenor a fixed height. - Submenus won't open: they rely on hover, which touch screens don't have.
Causes and fixes
A JavaScript error stops the toggle
Most commonThe menu is usually one small script, and it fails if anything earlier on the page throws an error. Your theme, an analytics tag or a chat widget can each be the culprit, and the page looks normal until you tap the icon.
Fix: Open the console at phone width and fix the first red error. Delay or isolate third-party scripts so their failures can't stop yours.
Another element covers the hamburger icon
A logo with a wide tap area, an announcement bar or a transparent header layer can sit over the icon. The tap lands on that element, so the menu never hears it.
Fix: Run document.elementFromPoint(x, y) with the icon's coordinates. Shrink or move the blocking element, or give the icon a higher z-index.
The menu opens behind the page content
A hero image or slider with its own transform or z-index creates a stacking context above the menu, so the menu opens underneath it.
Fix: Give the header a z-index above page content, and remove stray transform or filter rules from the header's parents.
A parent element clips the menu
If the header has overflow: hidden or a fixed height, the open menu gets cut off at the header's edge and looks as though nothing opened at all.
Fix: Remove the overflow rule from the header, or set the open menu to position: fixed so it escapes its parent.
Submenus depend on hover
Desktop dropdowns often open on :hover. A phone has no hover, so parent items either do nothing or jump straight to their link and skip the submenu.
Fix: Add a separate tap target such as an arrow button that toggles each submenu.
Two scripts toggle the menu at once
After a theme update or a plugin install, two scripts can both listen to the same icon. The first opens the menu, the second closes it, and you see a flicker or nothing.
Fix: Search the page source for duplicate menu scripts, and deactivate one. Mega menu plugins and theme menus often clash this way.
The page behind scrolls and the menu won't close
Menus lock page scroll while open. If the close button is off-screen on short phones, or the scroll lock never releases, visitors get stuck.
Fix: Keep the close button inside the visible area, let the menu scroll on its own, and close it on Escape and when a link is tapped.
How to find it on your site
- 1
Reproduce at phone width
Open DevTools device mode at 375px and reload, so the mobile header loads as it would on a phone.
- 2
Read the console
Tap the icon with the console open. New red errors point at the script that failed.
- 3
Ask what is on top
Use the element picker on the icon. If it selects something else, that element is catching the tap.
- 4
Test each page type
Try the homepage, a product or service page and a blog post. Menu bugs often affect one template only.
- 5
Test on a real iPhone
Safari handles fixed elements and scroll locks differently from Chrome, so finish on a real device.
Fixes by platform
Shopify
Announcement bar and mega menu apps are the usual cause. Turn off App embeds in the theme editor one at a time, testing the menu after each.
WordPress
Caching and optimisation plugins that combine or delay JavaScript often break menus. Exclude the menu script from delay settings, then clear the cache.
Wix and Squarespace
The menu is built in, so script errors usually come from custom code blocks. Remove recent header code injections and retest in the mobile preview.
Custom code
Use a real button with aria-expanded for the toggle, and add a Playwright test that opens the menu at 375px.
Frequently asked questions
Why is my hamburger menu not working?
Most often a JavaScript error has stopped the script that opens it, or another element sits on top of the icon and catches the tap. Check the browser console at phone width first, then use the element picker on the icon.
Why does my mobile menu open behind the content?
The content has a higher stacking order than the menu, often because of a transform, filter or z-index on a hero section. Raise the z-index on the header and remove those rules from its parents.
Why don't dropdown menus work on my phone?
Dropdowns built for desktop open on hover, and touch screens have no hover. Add a tap target that toggles each submenu so phone visitors can reach those links.
Why does my menu work on desktop but not on mobile?
Sites often use a separate menu and script for small screens. That mobile menu can fail while the desktop one works, because of its own script error, a covered icon, or a plugin that only loads on mobile.