Archived topic
Mobile Menu - 100% width not working on menu toggle?
2 replies · Started by Greg on November 30, 2021
Hi guys
Having a strange issue with the mobile menu on my site, for some reason the CSS class for the toggled state isn't loading:
.main-navigation.toggled .main-nav li {
width: 100%;
text-align: left;
}
It should look like:

But it's looking like:

I do have WP Rocket installed but have removed all the JS optimisation, and cleared the cache. The strange thing is the mobile menu was working perfectly before, with JS optimisation options in place - so not sure if something else might have caused it to break.
The only other thing I've changed was switching from Google Fonts to self-hosted variable fonts (.woff2).
Thanks
Greg
Sorry, now resolved!
Just incase anyone else finds this in the future - it was the 'Optimize CSS Delivery' and specifically the 'Remove Unused CSS' option in WP Rocket which was causing the issue. Once I switched that off and cleared the cache, all is good.
Thanks
Greg
Glad to hear you found the issue!!