I was working on my code when I stumbled upon this fun fact:
z-index
doesn't work for a fixed element and, therefore, fixed elements will always be in front.
Is there a way to place a non-fixed element in front of a fixed element?
Thanks.
#fixed {
background-color: red;
width: 500px;
height: 500px;
position: fixed;
z-index: 0;
}
#normal {
background-color: blue;
width: 500px;
height: 500px;
z-index: 1;
}
<div id = 'fixed'> I'm Fixed </div>
<div id = 'normal'> I'm Normal </div>