Responsive intro section with dropdown navigation using flexbox
Design comparison
Solution retrospective
Everything works great but in smaller screens, the side navbar is still overflowing even though I added overflow-x: hidden
to the body
tag... (swipe left on the screen to see overflowing side navbar)
My trials:
- adding a wrapper with
overflow-x: hidden
around themain
tag
Any feedback would be appreciated!
Community feedback
- @besttlookkPosted over 2 years ago
Hi, Nice work! Everything looks great. Here are a few points I like to add:
- On clicking overlay, sidemenu should close(for small screen)
- Dropdown should also also while clicking outside(for large screen)
- For large screen it would have looked good when the content were covering the whole view-port height.
Good luck,
Happy coding
Marked as helpful1@pyaetheiNPosted over 2 years ago@besttlookk Thank you for your feedback! I'll learn more about JavaScript events that you mentioned and I've fixed the content covering issue for larger screens.
0 - @Ging3rmintPosted over 2 years ago
Nice work. rather than putting media query for each and every bigger screen size, what we usually do is to set a max-width to your container then use margin: 0 auto to centralise it.
1@pyaetheiNPosted over 2 years ago@Ging3rmint yeah I added
margin: 0 auto
but that's not the case right now, I’m coding on laptop so to match the desktop screenshot, the image would be too big on screens between 968px and 1200px so I had to make another media query...0
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