Site using HTML, CSS and JavaScript

Solution retrospective
- How do I change the hamburger after opening nav in mobile design.
- Why the background in the body disappears after opening nav in mobile design
Please log in to post a comment
Log in with GitHubCommunity feedback
- @AgataLiberska
Hi @TajMhatre20, for your hamburger button question - you could add another image and toggle visibility on click, or just change the src attribute of your
<img>
element on click. However, I need to point out that you're using a<div>
for this element which makes it inaccessible - it should be a button or a link, really. Also, the items in your nav should be links and not plain text (I would put anchor tags inside the list items you have).Hope this helps! :)
- @RocTanweer
Hello 👋, For ham button, you may research on codepen.io or you can also see my Easybank project solution, I believe my extremely DRY method of writing sass code is reader friendly.
For background-image problem... You yourself has made background-image to none in js file... I would suggest put an overlay over the body when ham btn is toggled...you may also apply linear gradient as you tried in js file... You may watch coder coder on yt EasyBank project... She has the solution to your problem
Hope it helps Happy coding!
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