Bootstrap dropdown menu


I tried to create a navbar with dropdown based on Bootstrap. But the navbar does not collapse at all when i resize the screen. I tried serveral solutions from the internet but none of them worked the way they should. Hopefully some of you have a possible solution.


<nav class="navbar navbar-default navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          <a class="navbar-brand" href="#">Project name</a>
        <div id="navbar" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#contact">Contact</a></li>
        </div><!--/.nav-collapse -->

Could you post your navbar code?

I added the code in the discription.

Have you included the javascript, the navbar requires the collapse plugin:

I included jQuery and Bootstrap from CDN. Do I need to include something else? I thought these plugins were included.

If you include bootstrap.min.js, all plugins are already loaded. Are there any errors in your browser’s dev console?

Half an hour ago there weren’t any. So I checked again as you said. And you are right :slight_smile:
There is an error. I included jQuery 3.0.0 but Bootstrap needs a version lower than 3. Thank you for giving me this hint!

Did that solve your problem?

Yes it did. Now I just need to adjust the nested menu to the bootstrap framework. Do you have any experience with that?