1
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="/Menu">V11 Web</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#textoNavbar" aria-controls="textoNavbar" aria-expanded="false" aria-label="Alterna navegação">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="textoNavbar">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link dropdown-toggle" href="" id="MenuPrincipal1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Arquivos<span class="sr-only">(Página atual)</span></a>
<div class="dropdown-menu" aria-labelledby="MenuPrincipal1">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link dropdown-toggle" href="" id="MenuPrincipal2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Editar<span class="sr-only">(Página atual)</span></a>
<div class="dropdown-menu" aria-labelledby="MenuPrincipal2">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link dropdown-toggle" href="" id="MenuPrincipal3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Cadastros<span class="sr-only">(Página atual)</span></a>
<div class="dropdown-menu" aria-labelledby="MenuPrincipal3">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
</ul>
<span class="navbar-text text-white">
<span class="sublinhado">Usuário</span>:gerente
</span>
<button id="sair" type="button" onclick="location.href = '/';" class="btn btn-outline-light espaco-esq">Sair</button>
</div>
</nav>
Hello, I’m developing a code using HTML, and I went to create a nav-bar
, but it’s not going as well as I’d like.
I have the items of a menu, and all of them, when clicking, will open a submenu, for now all submenus have the same content. But by clicking to open the submenu, it is not opening in the right place... it opens as if it were with a float: left;
. I’ll leave a print for you... I’d like it to open according to the clicked item.
Note that in the first print, the clicked item was "Files", while in the second print the clicked item was "Searches", but both were opened in the same place. Help me please.
Can you make a [mcve]? The way it is we can’t reproduce the problem.
– Woss
I will create here, just a minute @Andersoncarloswoss
– user149429
Ta using which version of Bootstrap?
– hugocsl
version 4.3.1 @hugocsl
– user149429
@Andersoncarloswoss, I think this is appropriate
– user149429