Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

363
Views
Dropdown Menu inside Nav not working in Bootstrap 5

I have a bootstrap nav that is a collection of copied and pasted snippets from their website, but for some reason my dropdown nav doesn't drop anything down, and I'm a bit confused why it's wrong.

Here's what I have:

<div class="container">
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <div class="container-fluid">
        <a class="navbar-brand" href="#">CPM</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
            <div class="navbar-nav me-auto">
            <a class="nav-link" aria-current="page" href="{{ url_for('user.welcome') }}">Home</a>
            </div>
            <ul class="navbar-nav">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                      Account
                    </a>
                    <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
                      <li><a class="dropdown-item" href="{{ url_for('user.welcome') }}">Settings</a></li>
                    </ul>
                </li>
                <a class="btn btn-outline-danger me-md-2" href="{{ url_for('user.logout') }}">Logout</a>
                </ul>
        </div>
        </div>
    </nav>
</div>

Most of this was snipped from the resource page for it in bootstrap's docs: https://getbootstrap.com/docs/5.0/components/navbar/

The href values come from my flask application. I imagine it's something small, but when I click on the Account button in the dropdown menu nothing drops down and I don't get to see the li for Settings.

I downloaded the main javascript and css file for bootstrap and am serving it locally.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!