Astra theme “Off Canvas” menu not properly displayed on mobile device
-
In our website, we have an “Off Canvas” hamburger menu that displays when the website is viewed on mobile devices. Or at least it should be displayed.
Instead the first menu item is displayed and white spaces are displayed for the other menu entries.
We have no caches, and I’ve updated Astra to today’s latest version (4.9 from memory).
The page I need help with: [log in to see the link]
-
Hi @adrianstephens,
I have reviewed your website, and it seems to be working fine. Refer to this screenshot, please.
Let me know if I am looking in the right direction.
Kind regards,
Aradhy 🙂Thank you, @aradhy
I found a workaround. I noted that the website was displaying OK in a backup site (different URL, astra not licensed). The production site displayed white backgrounds for the tablet/phone off-canvas menu.
On investigation a bit further, the background colour was set by a css statement to –ast-global-color-5 (from memory), which happened to be white. This background css statement was not present in the backup site. I tentatively attribute the difference to the difference in license state for the two sites.
There was nothing in the off-canvas configuration that would make it do this, that I could see.
Anyhow, I fixed it up, and you are probably looking at the fixed/hacked version of the site, by including the following additional css:
@media (max-width: 921px) {
.ast-builder-menu-mobile .main-navigation .main-header-menu, .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-link, .ast-builder-menu-mobile .main-navigation .main-header-menu .sub-menu {
background-color: var(–ast-global-color-5);
background-image: none;
}
.ast-builder-menu-mobile .main-navigation .main-header-menu, .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-link, .ast-builder-menu-mobile .main-navigation .main-header-menu .sub-menu {
background-color: #93c01f; !important;
}
}
As I have a workaround, and having already spent about 4 hours trying to track down the source of the origianl problem, I’m not going to spend any more time on it, unless somebody points out an obvious mistake that I’m making – and I don’t rule that out :0)
Regards,
Adrian Stephens, Cambridge UK
Hi @adrianstephens,
Thanks for sharing your findings and the workaround! It’s interesting that the issue didn’t appear on the backup site—typically, the license status shouldn’t affect CSS like that. Your solution makes sense, and applying custom CSS should ensure consistency across devices.
To pinpoint the exact cause, we would need to take a closer look, likely through the Customizer settings. If you’d like us to investigate further, please let us know, and we’d be happy to assist!
Kind regards,
Aradhy 🙂
The topic ‘Astra theme “Off Canvas” menu not properly displayed on mobile device’ is closed to new replies.
