question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

navbar-fixed AND mobile collapsable menue.

See original GitHub issue

Hi! This is a promising framework, I like it! I wonder though, it seems like there is no solution for having both the navbar-fixed and also use the nav-mobile button-collapse. As of now, the z-indexes is disturbing each other.

The error:

When the collapse mobile nav is pulled out, the fixed-navbar (at the top) is “above” the faded area.

My code

Here is my code that causes the problem.

<div class="navbar-fixed">
  <nav class="light-blue lighten-1" role="navigation">
    <div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo">Logo</a>
      <ul class="right hide-on-med-and-down">
        <li><a href="#">Navbar Link</a></li>
      </ul>

      <ul id="nav-mobile" class="side-nav" style="left: 0px;">
        <li><a href="#">Navbar Link</a></li>
      </ul>
      <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
    </div>
  </nav>
</div>

I hope you guys will take a look at this soon because I think that the combination of navbar-fixed and the mobile slide out menu will be very common. Or perhaps am I just doing it wrong?

And again, sweet framework!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
blomdahldanielcommented, Jul 3, 2015

Thanks to @carlosperate codepen i saw that my .side-nav should be outside of the <nav> ... </nav> and that fixed it (with the correct z-index settings).

In the navbar docs it says to put the .side-nav <ul> inside of the <nav> ... </nav> however when combining the <div class="navbar-fixed"> it should be outside of that div. Just like the codepen shows.

Maybe could add a comment about that in the docs?

5reactions
Feudacommented, Mar 30, 2017

I think ‘outside the side-nav’ should be in docs @Dogfalo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixed navigation bar on mobile - css - Stack Overflow
I just tested on my phone and the navbar seems to be fixed no problem. Maybe adding this meta tag will help you...
Read more >
How To Create a Fixed Menu - W3Schools
Fixed Top Menu. Scroll this page to see the effect. The navigation bar will stay at the top of the page while scrolling....
Read more >
Bootstrap 5 Responsive, Fixed Top / Bottom Navbar and More
You can also create different variations of the navbar such as navbars with dropdown menus and search boxes as well as fixed positioned...
Read more >
Navbar - Bootstrap
Documentation and examples for Bootstrap's powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, including ...
Read more >
Bootstrap Navbar - examples & tutorial
Responsive Navbar with Bootstrap 5. ... Fixed top or bottom position. ... Dropdown. You can also use dropdowns in your navbar nav. Dropdown...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found