Search code examples
javascripthtmlcsscss-positionz-index

How to know the z-index of two elements


I have two carousels which one of them is set to absolute and a toggle button above them which switches them out when I switch to the second one.

I can't click it, I feel the error is from z-index but I didn't set any z-index on any of the elements, is there a plugin to view their z-index?


Solution

  • If you are using chrome, you can check it in developer tools.

    Right click on the element you want to check and inspect element. Switch to elements tab in developer tool then click on computed tab. It shows you all computed styles in alphabetical order.

    enter image description here