Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#sidenav-overlay showes up above .side-nav #2879

Closed
ezkay opened this issue Mar 5, 2016 · 10 comments
Closed

#sidenav-overlay showes up above .side-nav #2879

ezkay opened this issue Mar 5, 2016 · 10 comments

Comments

@ezkay
Copy link

ezkay commented Mar 5, 2016

Hi,

the #sidenav-overlay showes up above the slide out .side-nav (see screenshot).

I'm wondering how to fix this? Is it the right way to just set the following css?

#sidenav-overlay {
    left: 240px;
}

bildschirmfoto 2016-03-05 um 16 09 08

@diegogurgel
Copy link

Hi @ezkay same occurs here so i just called open and close programatticaly:
$('.button-collapse').sideNav('show');
$('.button-collapse').sideNav('hide');

@Uzzije
Copy link

Uzzije commented Aug 12, 2016

@ezkay overide side-overlay z index in your own css file
#sidenav-overlay {
z-index: 1;
}
make sure that your css file comes after materialize own css file

@vpezeshkian
Copy link

That's not the best approach, modifying css is not encouraged, especially when you have other widgets on the screen such as FAB buttons.

Anyway the issue persisted even though the z-index on layover is 998 and the menu 999

@441N143G
Copy link

441N143G commented Nov 9, 2016

z-index: 996 works perfectly

@petebytes
Copy link

Thanks for both suggestions! The following worked for me.

#sidenav-overlay {
z-index: 996;
}

@xylude
Copy link

xylude commented Jan 10, 2017

I had the same problem, and after digging around I realized that if you put the .side-nav inside of the .navbar-fixed component the z-index for .navbar-fixed will override the one set on .side-nav. I fixed this without messing about with the css by moving the .side-nav component out of the .navbar-fixed one.

The lesson learned here is even if you aren't using the .navbar-fixed class, it might be some other parent causing your z-index to be wrong on the .side-nav.

Hope this helps!

@DBPreston
Copy link

@xylude's fix worked for me - far better than overriding the z-index in CSS (which didn't work in 0.98.0 anyway). This should maybe referred to in docs.

@tomscholz
Copy link
Contributor

tomscholz commented Feb 24, 2017

I would never recommend to change the z-index. When using the fixed navbar you have to move the mobile sidenav outside the nav sector. Anyway. This is a duplicate to #3844. Please close or create a PR that fixes this issue. Thanks :)

@tomscholz
Copy link
Contributor

These issues are all duplicates:
#1664
#3918
#4046
#4231
#437
#4318
#3982
#2879
#4187

For the future discussion, please use this issue instead.
#3844

@cedric858
Copy link

@xylude's fix worked for me too, thx a lot! So shouldn't they update their materializer's documentation and mention this case of figure when people use the navbar or sidenav component?

Repository owner locked and limited conversation to collaborators Sep 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants