Small issues creating a dropdown menu from a nav bar

Hello guys, in the following codepen, I tried to create a dropdown menu from a navigation bar... I was able to do it but while doing so, I encounter some issues... with the element having the class dropdown-content, see that I have listed the anchor tag elements as separate element.... <a>..</a> The thing is if I try to do that: <li> <a>..</a></li>... everything breaks... I don't understand why... also, we can't use separate li container for each anchor tags https://codepen.io/Fakeur/pen/dyxGWjP
Fakeur
CodePen
Untitled
...
2 Replies
Chris Bolson
Chris Bolson4w ago
What is it that breaks? You should be able to use a nested ul with it's corresponding li elements within the drop-down I forked your pen and made a couple of changes to the HTML (used a nested ul) and to the CSS (with comments) https://codepen.io/cbolson/pen/abedyEV
Faker
Faker3w ago
Hmm I will have a look, thanks !
Want results from more Discord servers?
Add your server