what if any element passes over another element and both have same z-index…so which element would appear over the other
Z-index
Hi @discobot,
element1 has z-index 10, and appears first in the document
element2 also has z-index 10, but appears second in the document
So basically, in this case when the document renders element2 , element2 will be above element1 because element1 was written and then the document read element2 and overlaps it or it can also be said that element 2 is written over the top of element1. modifying or increasing the z-index of element1 could bring it on top. Ideally you can have a click handler on element1 to raise it if you will ever need a to appear on top of element2.
Hi! To find out what I can do, say @discobot display help
.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.