Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Intro section with dropdown navigation w/ TailwindCSS

#accessibility#tailwind-css
hanifNA 520

@Afrianns

Desktop design screenshot for the Intro section with dropdown navigation coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


🤔I wonder how to make other dropdown close when I click one dropdown, and thank you!!😊

Community feedback

@WickedSoul-17

Posted

your dropdown is working on click, Try to use :Hover pseudo code on the element . other wise you can also use focus pseudo code.

0
King 310

@king-oldmate

Posted

There are ways of doing it, and event delegation would probably be the most efficient method, but since there aren't that many dropdown menus, all you need to do is code it so that no matter what menu item you click, it will:

  1. hide every other menu
  2. reveal the menu that was clicked.

Hope that made sense! (Just experiment with it!)

0

@MunBrian

Posted

I used mouse over/out event instead of the click event in my solution and it works fine.

0
Saleem 220

@Thesaleem

Posted

I had same issues too but I guess it's something we are missing in the DOM manipulation.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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