I have a navbar with brand logo at left and links at right, and the sidenav function works perfect.
I tried to make the navbar fixed, but now the sidenav links doesn't works (the sidenav appears in grey color)
Code
<div class="navbar-fixed">
<nav class="green">
<div class="nav-wrapper">
<a href="/" class="brand-logo">
<i class="material-icons">shopping_basket</i>
macromeal
</a>
<a href="#" data-activates="mobile-demo" class="button-collapse">
<i class="material-icons">menu</i>
</a>
<ul class="right hide-on-med-and-down">
<%= render 'layouts/links' %>
</ul>
<ul class="side-nav" id="mobile-demo">
<%= render 'layouts/links' %>
</ul>
</div>
</nav>
</div>
Screenshot

Yes same problem.
Please try moving the side-nav out of the navbar structure. Like this:
<div class="navbar-fixed">
<nav class="green">
<div class="nav-wrapper">
<a href="/" class="brand-logo">
<i class="material-icons">shopping_basket</i>
macromeal
</a>
<a href="#" data-activates="mobile-demo" class="button-collapse">
<i class="material-icons">menu</i>
</a>
<ul class="right hide-on-med-and-down">
<%= render 'layouts/links' %>
</ul>
</div>
</nav>
</div>
<ul class="side-nav" id="mobile-demo">
<%= render 'layouts/links' %>
</ul>
Not exactly sure but in principle this works. :smiley:
wow its working
Daniel Bendel notifications@github.com于2016年12月8日周四 下午10:32写道:
Please try moving the side-nav out of the nav. Like this:
<%= render 'layouts/links' %>
Not exactly sure but in principle this works. 😃
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Dogfalo/materialize/issues/3982#issuecomment-265753284,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJEkgwq_VDbLF5WNLRcJeNrQMF5aVExQks5rGBTqgaJpZM4LHMBm
.
Thanks @Thanood ! I will try it.
Btw, I already fixed it by this way:
function initialize() {
$('.button-collapse').sideNav();
$('.button-collapse').click(removeOverlay);
}
function removeOverlay() {
$('div[id^=sidenav-overlay]').remove();
}
Oops, sorry @tomscholz . I searched but I didn't find it
These issues are all duplicates:
https://github.com/Dogfalo/materialize/issues/1664
https://github.com/Dogfalo/materialize/issues/3918
https://github.com/Dogfalo/materialize/issues/4046
https://github.com/Dogfalo/materialize/issues/4231
https://github.com/Dogfalo/materialize/issues/437
https://github.com/Dogfalo/materialize/issues/4318
https://github.com/Dogfalo/materialize/issues/3982
https://github.com/Dogfalo/materialize/issues/2879
https://github.com/Dogfalo/materialize/issues/4187
For the future discussion, please use this issue instead.
https://github.com/Dogfalo/materialize/issues/3844
Most helpful comment
Please try moving the
side-navout of the navbar structure. Like this:Not exactly sure but in principle this works. :smiley: