Menu Hamburger Bootstrap Burger

Asked

Viewed 752 times

0

My app has a Dashboard with a left side column, which is where the menu is. When this page opens on smaller screens the column disappears (this already happens), but I need instead the Hamburger menu to appear so that the user can have access to the menu.

My code is like this:

<body>
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-3 col-md-2 sidebar opficio dashMenuFont">
                        <div class="nav-img">
                            <img src="img/userDefaultImage.png">
                            <p class="opficio-bold userName"><?php echo strtoupper($_SESSION ['nickUser']) ?></p>
                            <hr>
                        </div>
                        <div class="dash-menu">
                            <a  href="dashboard.php?p=home"><p><span class="glyphicon glyphicon-home      "></span> Início</p></a>
                            <a  href="dashboard.php?p=search"><p><span class="glyphicon glyphicon-search"></span> Buscar</p></a>
                            <a  href="dashboard.php?p=watched"><p><span class="glyphicon glyphicon-ok-circle"></span> Assistido</p></a>
                            <p><span class="glyphicon glyphicon-comment"></span> Bate-papo</p>
                            <p><span class="glyphicon glyphicon-cog"></span> Configurações</p><hr>
                            <p></p>
                            <p></p><hr>
                        </div>
                        <div class="nav-logo-bot">
                            <img src="img/nav-logo.png">
                        </div>
                    </div>
                    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                        <?php
                        $link = filter_input(INPUT_GET, 'p');
                        include $link . ".php";

                        ?>
                    </div>
                </div>
            </div>
        </body>

The result is this: inserir a descrição da imagem aqui

And Mobile is like this:

inserir a descrição da imagem aqui

I tried to find this solution but nothing worked.

Thank you!

1 answer

1

  • So, it’s very similar to a code that I used, but it doesn’t work... I can only make the button appear if it’s in the fixed div at the top (which can’t) and even then when I click the button nothing happens

Browser other questions tagged

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