Design comparison
Solution retrospective
I found difficulty in coding a navbar and how to make the content slide down when the dropdown is clicked. I am unsure that whether the way I used media querry is the right way.
Community feedback
- @godmayhem7Posted over 1 year ago
Wow your code is really nice ๐๐ You put so much efforts in your CSS and that made your code really look beautiful ๐๐. But I noticed that your website isn't responsive on all devices. One of the crucial aspects of being a web developer is ensuring that your website is responsive in all devices. If not your designs would look displaced and it wouldn't be nice, so I would advise you to learn more about media queries in CSS this feature helps you create a well responsive website on all devices. The rest of your code was okay. Hope this feedback was helpful ๐๐
Marked as helpful0 - @MirMurrPosted over 1 year ago
Hello Adithya,
I like your solution! Thereยดs another way to solve the "dropdown issue". Simply add an eventListener to the target (in this case your target is the button you want to click on and the event is "click"). Then toggle the active class on your target element and you just format the .active class in CSS accordingly.
Hereยดs an example in JS:
featureButton.addEventListener('click', () => { featureDropdown.classList.toggle('active'); });
I hope it helps. :)
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