Not sure I understand the issue. If you set a nav bar to sticky, it will alway stick to the top of the page. The z-index only dictates the stacking order of the element (the higher the number, the higher in the stack - in the case of a sticky nav bar, it will be set at the topmost level (usually 10000). There should be no need to change the z-index unless your page content is scrolling OVER the nav bar instead of behind it. If you can explain the issue you’re trying to solve, we may be able to provide a more helpful answer.