Reputation: 397
I have this site:
Can you tell me please which is why the menu links not working?
CODE HTML:
<header id="masthead" class="navbar navbar-default" role="banner">
<div class="container-fluid">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="width: 674px; margin-left: 260px;">
<!-- <div class="container-fluid">-->
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h1 class="site-title"><a href="http://bagel.dg-site.com/bagel/" rel="home">Bagel House</a></h1>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-navbar-collapse-1">
<!-- <form class="navbar-form navbar-left" role="search">-->
<!-- <div class="form-group">-->
<!-- <input type="text" class="form-control" placeholder="Search">-->
<!-- </div>-->
<!-- <button type="submit" class="btn btn-default">Submit</button>-->
<!-- </form>-->
<a class="screen-reader-text skip-link" href="#content">Skip to content</a>
<div class="menu-ggg-container"><ul id="menu-ggg" class="menu"><li id="menu-item-18" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-17 current_page_item menu-item-18"><a href="http://bagel.dg-site.com/bagel/">Home</a></li>
<li id="menu-item-13" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-13"><a href="http://bagel.dg-site.com/bagel/index.php/about/">About</a></li>
<li id="menu-item-10" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-10"><a href="http://bagel.dg-site.com/bagel/index.php/news/">News</a></li>
<li id="menu-item-7" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-7"><a href="http://#">Contact</a></li>
<li id="menu-item-227" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-227"><a href="http://bagel.dg-site.com/bagel/index.php/contact/">Contact</a></li>
</ul></div>
</div><!-- /.navbar-collapse -->
<!-- </div>-->
<!-- /.container-fluid -->
</nav>
</div><!-- .container -->
</header>
I put an image to better understand what I mean links.
Which may be why it does not work?
It's hidden in a div?
I tried to use z-index
but unfortunately does not work ...
You can help me solve this problem please?
Thanks in advance!
Upvotes: 0
Views: 40
Reputation: 2013
Please find the fiddle. I have used a stripped down version of your code..
http://jsfiddle.net/josangel555/y35b2qfv/
ul
.ul
: nav navbar-nav
Upvotes: 0
Reputation: 1572
The reason why is because you have a z-index set to -2 on .navbar-default Change it to something like 10 and you can click the links.
.navbar-default {
background-color: #F8F8F8;
border-color: #E7E7E7;
z-index: 10; <-- change from -2 to 10
}
This will fix the problem but you may have to fix the rest of your elements.
The problem when giving a negative index to the container of the nav is that your nav elements on some browsers inherit that z-index. You may need to rework your layout.
Upvotes: 1
Reputation: 2880
You need to remove the z-index from your .navbar-default class and from your navbar-fixed-top class.
You'll also want to set your nav width to 1046px.
Upvotes: 0
Reputation: 235
Instead of trying to use an anchor, try the li onclick:
<li onclick="location.href='http://bagel.dg-site.com/bagel/index.php/about/">About</a></li>
Upvotes: 0