I'm dealing with two separate menus - one for mobile version and one for PC version. However, the mobile menu seems to be overlapping/blocking the PC menu. How can I resolve this issue?
I've attempted various solutions such as removing the mobile menu in media queries when changing screen width, but it hasn't been successful. I also tried using Javascript to add/remove classes, but it only affected the mobile menu and not the PC menu.
window.onload = function() {
overlay();
};
function overlay() {
let nav = document.getElementById("nav");
if (document.body.style.width < "991px") {
nav.classList.add("overlay");
} else {
nav.classList.remove("overlay");
}
};
My goal is to have both menus work without any conflicts, but currently, the PC menu is not functioning properly while the mobile menu works fine. There are no error messages in the console.