negomi / react-burger-menu

:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
http://negomi.github.io/react-burger-menu/
MIT License
5.05k stars 586 forks source link

How to modify the z-index of button #400

Closed simron-smwork closed 4 years ago

simron-smwork commented 4 years ago

Hi, really appreciate your help and quick replies! I am trying to make just the burger button (not the whole sidebar menu) overlap my existing horizontal top navbar. How do I make that happen? How will I be able to customize the zIndex of the button?

negomi commented 4 years ago

Hi @simron-smwork, you can apply any styles you like to the button.

For z-index to work though, the position property needs to be explicitly set to absolute, fixed, or relative, and your markup structure matters too.

If it's not working, I'd recommend reading up on how z-index works because there are a few gotchas that can make it tricky if you're not aware of them.