0
My menu with toggle-icon, being used exactly like that of the bootstrap4 example documentation simply does not expand.
I tried that solution but nothing has changed. Currently the code is like this:
<!DOCTYPE html>
{% load staticfiles %}
<html lang="pt-br">
<head>
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
<link rel="stylesheet" href="{% static 'css/giositeapp.css' %}"/>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>G M</title>
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm shadow p-4 navbar-dark">
<a href="#" class="navbar-link">Home</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogg" aria-controls="navbarTogg" aria-expanded="false" aria-label="Alterna navegação">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogg">
<ul class="navbar-nav flex-row ml-sm-auto d-none d-sm-flex">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a href="#" class="nav-link">P</a>
</li>
<li class="nav-item active">
<a href="#" class="nav-link">B</a>
</li>
<li class="nav-item active">
<a href="#" class="nav-link">C</a>
</li>
</ul>
</ul>
</div>
</nav>
</header>
<div class="container">
{% block content %}
{% endblock %}
</div>
</body>
</html>
The tags with {%%}
are on account of Django, and apparently not the problem as my custom css file is working normally.
Bootstrap 3 or 4 you are using ?
– hugocsl
Sorry I don’t talk, using 4
– Giovane Machado
Initially I tried just linking, but to remove the doubt I downloaded the files and made the references
– Giovane Machado
Guy removed the answer because he was looking at his code and it actually seems to be the same BS4. I think the problem should be another...
– hugocsl
Yes, it is another, but your answer helped me find it. Notice that I have one ul inside the other, the error is in the external ul, it is bugging.
– Giovane Machado
I had used this external ul to position part of the items on the right of the screen, but apparently, this also made the toggle work in a dubious way
– Giovane Machado
is the d-None over there that prevents it from working, I caught haha
– Giovane Machado