Hello, I’m trying to make the dropdown menu in my navbar collapse but it does not seem to be working. I have tried putting the JQuery CDN before the Bootstrap on the resources part of CodePen but that does not seem to work. Any help would be much appreciated thanks!
Select the choice that has 4.1.3/js in the path and you’re good to go
OMG thank you so much. Now I just Have to figure out how to align the dropdown to the center
You’re welcome. That must have been frustrating.
I think your hierarchy of elements is different than the example on the documentation page. Their menus are usually in
I usually just copy the example code and delete what I don’t want. Then I customize what is remaining. Sounds lazy but the library code is looking for specific elements of specific classes and it is hard to tell what can and cannot be left out.
position: relative to your
.navbar-collapse class, since the dropdown
ul already has an absolute position, it fits into its parent