Toggle bootstrap menu is not expanding

0

My menu with toggle-icon, being used just like the bootstrap4 sample documentation does not just expand.

I tried this solution but did not change anything . Currently the code looks 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><scriptsrc="{% 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 for Django, and apparently they are not the problem because my custom css file is working normally.

    
asked by anonymous 02.12.2018 / 23:11

1 answer

1

To get registered, d-none was the problem. It works perfectly as follows (removing it):

<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-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>
    
02.12.2018 / 23:52