In sololearn z-index works only when I give it negative one value. if I put any other value it doesn't work. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

In sololearn z-index works only when I give it negative one value. if I put any other value it doesn't work.

27th May 2018, 4:41 PM
Prathamesh Sawant
Prathamesh Sawant - avatar
2 Answers
+ 4
Let's see, first are the elements you are using z-index on positionned? It only works for elements with position absolute or relative
27th May 2018, 5:11 PM
cyk
cyk - avatar
+ 4
Yes you are right. I didn't positioned one of the element to relative and absolute. Thanx. :)
28th May 2018, 6:12 AM
Prathamesh Sawant
Prathamesh Sawant - avatar