Reputation: 65
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?
Upvotes: 4
Views: 5826
Reputation: 815
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.
Upvotes: 7
Reputation: 220
You can get the element, then extract the styles. Then you can get the value of style property by using camelcase for the css attribute name.
const style = getComputedStyle((document.getElementById("element"));
const zIndex = style.zIndex;
console.log(zIndex);
Upvotes: 0
Reputation: 693
Maybe I missed the point of the question, but simply using 'inspect' on Firefox or Chrome will allow you to see all styling properties on all element.
To get there:
as you can see the header of this very page has a z-index value of 5050
Upvotes: 1