I want to prevent span overlapping to the div (Solved)

I want to prevent span overlapping to the div (Solved)
0.0 0

#1

How can I prevent span overlapping div?
I set span inside the p element and the span overlapping to the .main-navigation. I add my portfolio link, I would appreciate any help. I tried display: inline-block; , display: block, overflow: hidden but seems not working.
Thank you,


#2

Hey. You just need to set a z-index for your <nav> tag; that will put it in front of everything else.

.main-navigation {
  z-index:1;
}

#3

Thank you for your quick respond! It worked! I saw the article say use z-index but I tried added z-index to the span not the main-navigation, now it works! Yay :slight_smile:
Thanks again!