Responsive Dropdown Navigation using REACT & Styled Components

Solution retrospective
Hi guys, Since I'm practicing React as my first framework and recently familiarized myself with styled components I wanted to put that into practice with this challenge.
I'm hoping to hear some feedback on what I could have improved on/written more efficiently. :)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @byronbyron
@DanK1368 Hia mate.
Try
position: fixed;
instead ofposition: absolute;
, to fix the scrolling issue.@media screen and (max-width: 670px) { .ggprRt { /* position: absolute; */ position: fixed; top: 0px; left: 0px; height: 100vh; background-color: rgba(0, 0, 0, 0.5); transform: translateX(110%); opacity: 0; } }
Marked as helpful - @besttlookk
HI, Nice work! Here are some points i like to make
- Its not responsive for all screen size. When ever develop anything ake a habbit of making responsive even if it is not asked for.
- Dropdown menu should close when clicking outside the dropdown.
I also made this using styled-component. Here is the link if you want any refernce
https://intro-section-with-dropdown-navigation-phi.vercel.app/
Feel free to drop your feedback.
Good luck,
Happy coding
- @DanK1368
I also just realized, that when viewing the site on mobile you can scroll beyond the content ( right and down ) . I'm not sure why that is..
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