9

I am using drop-down menu in my header for notification, but when drop down opens all the div's behind that are visible then I gave z-index to all the divs but the links on those div's are not clickable now!

drop-down div CSS:

.drop-down{
   overflow:scroll;
   overflow-x:hidden;
}

and the div's behind it are

#main-div{
   z-index:-1;
   position:absolute;
}
Arpita Patel
  • 300
  • 1
  • 14
nadeem ahmad
  • 181
  • 1
  • 1
  • 10

1 Answers1

4

I guess that the negative z-index places the links underneath the body.

Use a positive z-index, for example 10 on the element that should be at the back and 20 on the element that should be in front.

GreyRoofPigeon
  • 17,833
  • 4
  • 36
  • 59