When attempting to create a solution, ensure that the responsive toolbar is enabled on your Chrome browser. My approach involves designing for mobile first and then adapting for desktop. However, I am encountering an issue where the hamburger menu opens and obstructs my content. I have tried using position: relative; to address this, but I would like to have the navbar fixed so it remains at the top when scrolling. Additionally, clicking the hamburger menu while scrolling causes it to return to the top. Any assistance with solving these issues would be greatly appreciated.
const toggleButton = document.getElementsByClassName('toggle-button')[0]
const navbarLinks = document.getElementsByClassName('navbar-links')[0]
toggleButton.addEventListener('click', () => {
navbarLinks.classList.toggle('active')
})
...