Add more than one dropdown to the navbar

Asked

Viewed 35 times

-2

How could I add more dropdowns to my code’s navbar? I tried to copy the button and paste right down into my code, but the navigation bar is replicated below, I just want more options next to the item "File".

Follows the code:

</head>
    <body>
         <div class="navbar">
  <div class="dropdown">
    <button class="dropbtn">Arquivo
      <i class="fa fa-caret-down"></i>
    </button>
    <div class="dropdown-content">
      <a href="#">Novo</a>
      <a href="#">Abrir</a>
        <a href="#">Salvar</a>
        <div class="navbar">
  <div class="dropdown">
    <button class="dropbtn">Arquivo
      <i class="fa fa-caret-down"></i>
    </button>
    </div>
  </div> 
</div>
         <textarea rows="35" cols="142">
        </textarea>

    </body>
    </html>
  • Which version of Bootstrap you are using??

1 answer

1


It seems that the tag <div class="navbar"> is duplicated in your code!

<html>
<head>
</head>
    <body>
    <div class="navbar">
      <div class="dropdown">
    <button class="dropbtn">Arquivo
      <i class="fa fa-caret-down"></i>
    </button>
    <button class="dropbtn">Arquivo
      <i class="fa fa-caret-down"></i>
        </button>
        <div class="dropdown-content">
          <a href="#">Novo</a>
          <a href="#">Abrir</a>
          <a href="#">Salvar</a>
        </div>
      </div> 
    </div>
    <textarea rows="35" cols="142">
    </textarea>
</body>
</html>

Upshot:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.