Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

How to disable z-index: auto #253

Open
naieem-bd opened this issue Apr 2, 2017 · 3 comments
Open

How to disable z-index: auto #253

naieem-bd opened this issue Apr 2, 2017 · 3 comments

Comments

@naieem-bd
Copy link

when i scroll down my header goes under other sections, texts and other thing because of default z-index: auto value. when it's stick my z-index value not working cause

element.style {
z-index: auto;
}

now please some one tell me how to disable or remove z-index: auto value.
Thanks.

@benedekh
Copy link
Contributor

benedekh commented Apr 4, 2017

There are three possible options to solve the problem:

  1. set the zIndex argument to inherit
  2. change the default value in the source, see PR Changing default zIndex value for inherit. fix #250 #251
  3. create a CSS class and apply that class on the sticky element.

@naieem-bd
Copy link
Author

Thanks a lot Bro... 👍

@Sogl
Copy link

Sogl commented Jun 9, 2017

Really strange situation.
inherit didn't help me, just because the same element have z-index and inline style with z-index: inherit breaks it.

Only z-index: ... !important helped me.
This library need an option to fully disable z-index property.

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

3 participants