How to make links clickable with a negative z-index?

I use the drop-down menu in my header for notification, but with the drop-down list all the divs that are visible open, then I gave the z-index to all divs, but the links to these divs can no longer be viewed!

CSS dropdown div

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

and the div behind it is

#main-div{
   z-index:-1;
   position:absolute;
}
+4
source share
1 answer

I think negative z-indexputs links underneath in the body.

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

+1
source

All Articles