Navbar menu opens expanded on phone (bootstrap)

I am using bootstrap menu and it opens already expanded on phone. Please help

My code looks like:

<div class=" " id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li class="hidden">
                        <a href="#page-top"></a>
                    </li>
 
                    <li>
                        <a class="page-scroll" href="#portfolio">Packages</a>
                    </li>
                    <li>
                        <a class="page-scroll" href="#reviews">Reviews</a>
                    </li>
                    <li>
                        <a class="page-scroll" href="#contact">Contact us</a>
 
                </ul>
            </div>
like0

Answers

You have not used "collapse navbar-collapse"

Razi Abuzar's picture

You have missed:
class="collapse navbar-collapse"
You code should be like

 

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li class="hidden">
                        <a href="#page-top"></a>
........
......

This will resolve your issue.

Cheers!

Tags: 

0 points
up
down