While working on creating semantically correct HTML, I included a header and footer in my document.
The structure of the document looks like this:
...
Currently, the header, main, and footer take up 100% of the height. I want the modal to do the same once a button is pressed.
The issue I'm facing is that even when I set every element's z-index to 0 and the modal's z-index higher than the header and footer, the header and footer remain on top of the modal.
I did find a workaround by giving the header and footer a negative z-index, but I'm not satisfied with this long-term solution. I'm also curious why setting the div's z-index higher than the header and footer does not have any effect.