Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
I would like to make the menu different next time. I created two menus depending on the size of the screen, so there were more lines of code in both HTML and CSS.
What challenges did you encounter, and how did you overcome them?My biggest challenge was making the mobile screen menu remain hidden in case the screen was larger than 850px. Investigating further I used the "resize" event for the entire document. The code was like this:
window.addEventListener("resize", () => {
let screen = parseFloat(document.body.clientWidth);
if(screen > 850) {
menuMobile.style.display = "none";
overlay.style.display = "none";
}
})
What specific areas of your project would you like help with?
In this and all projects I would like to improve my JavaScript skills.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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