Streaming live at 10am (PST)

Problem with dropdown menu on a double navbar

#1

Hey I’ve been trying to make a dropdown menu for this website but in the navbar section is like a double navbar, one for contact and the other one for the page navigation, the problem is that the dropdown menu doesn’t overlap the navbar below, maybe is something with positioning but idk, hope you guys can help me https://preview.webflow.com/preview/dr-lassen?utm_source=dr-lassen&preview=d13169a2d175f6fb30a63f77dfac4cfc

#2

1 Like
#3

awesome! I was playing with the dropdown index instead lmao, thank you so much!!

1 Like
#4

In order to master z-index, you have to understand stacking context. Z-index works first with siblings element, then inside of them (unless it’s not specified on one of the siblings…)

in your case, the context between your first and second navbar is defined, and the second navbar is naturally on top. So you can increase the z-index of a child of the first one, it will never be on top of the second navbar. What we did is increase the zinde of the siblingof the second navbar, to work inside of the same context.

I made a quick landing page to try to explain it: http://z-index.webflow.io/

1 Like
#5

awesome, got it! thank you so much for your time, really appreciated

1 Like