Responsive news homepage using HTML and CSS

Solution retrospective
How to do the hamburger menu
Please log in to post a comment
Log in with GitHubCommunity feedback
- @aamirmasood0102
Hey!Your design is great except for the last section of 3 parts in mobile-screen view,margin padding issues.And to open and close the menu you have to add eventlistner to hamburger icon by javascript like below:
javascript
const nav = document.getElementById("nav"); const openMenuButton = document.getElementById("openMenuButton"); const closeMenuButton = document.getElementById("closeMenuButton"); closeMenuButton.addEventListener("click",()=>{ nav.classList.add("hidden"); closeMenuButton.classList.add("hidden"); openMenuButton.classList.remove("hidden"); }); openMenuButton.addEventListener("click",()=>{ nav.classList.remove("hidden"); openMenuButton.classList.add("hidden"); closeMenuButton.classList.remove("hidden"); });
Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord