0

This is my code for navbar it works with desktop but when i go with responsive the menu links does't work . i click on menu and nothing happen please help.

<header class="header">
    <div class="header-nav"> 
      <nav role="navigation" class="navbar navbar-default navbar-fixed-top navbar-slide show-menu" style="background-color:#7c3a1c;">
        <div class="container">
          <div class="navbar-header">
            <button aria-controls="navbar" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
            <a id="header-logo" href="index.php" class="navbar-brand"><img class="margin-top" src="images/logo.jpg" alt=""></a> </div>
          <div class="navbar-collapse collapse" id="navbar" aria-expanded="false" role="menu" style="height: 1px;">
            <ul class="nav navbar-nav style2 navbar-right">
              <li><a href="index.php">Home</a></li>
              <li><a href="about-us.php">About Us</a></li>
              <li><a href="gallery.php">Gallery</a></li>              
              <li><a href="contact.php">Contact</a></li>
              <li style="background-color: #cc1b47;"><a href="#">805-305-2630</a></li>
            </ul>
          </div>
        </div>
      </nav>  
    </div>
  </header> 

`

Amit singh
  • 2,006
  • 1
  • 13
  • 19
usman
  • 63
  • 10

1 Answers1

0

Check this snippet..

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<header class="header">
  <div class="header-nav">
    <nav role="navigation" class="navbar navbar-default navbar-fixed-top navbar-slide show-menu" style="background-color:#7c3a1c;">
      <div class="container">
        <div class="navbar-header">
          <button aria-controls="navbar" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button"> <span class="sr-only">Toggle navigation</span>  <span class="icon-bar"></span>  <span class="icon-bar"></span>  <span class="icon-bar"></span> 
          </button>
          <a id="header-logo" href="index.php" class="navbar-brand">
            <img class="margin-top" src="images/logo.jpg" alt="">
          </a>
        </div>
        <div class="navbar-collapse collapse" id="navbar" aria-expanded="false" role="menu" style="height: 1px;">
          <ul class="nav navbar-nav style2 navbar-right">
            <li><a href="index.php">Home</a>
            </li>
            <li><a href="about-us.php">About Us</a>
            </li>
            <li><a href="gallery.php">Gallery</a>
            </li>
            <li><a href="contact.php">Contact</a>
            </li>
            <li style="background-color: #cc1b47;"><a href="#">805-305-2630</a>
            </li>
          </ul>
        </div>
      </div>
    </nav>
  </div>
</header>
Amit singh
  • 2,006
  • 1
  • 13
  • 19
  • as you can see in snippet if you click in `about us` link it will show 404 that means page not found. so link is working well but there is no page with `about-us.php` in my snippet so it is showing `404` – Amit singh Sep 30 '15 at 08:20
  • i have replace all the code but still issue remain ... i am agree with u @Amit but can u look close to my code and tel me what mistake i am doing ... – usman Sep 30 '15 at 08:37
  • @usman if you are talking abot the last link than it will not work except that all code seems to fine – Amit singh Sep 30 '15 at 08:50