Currently, I am facing an issue with two elements in my design. The first element consists of dotted circles that should have a z-index of -999 so they remain in the background entirely. The second element is a login form that needs to have a z-index of 999 to appear on top. However, despite both elements being positioned absolutely, the z-index doesn't seem to be taking effect. I attempted to consolidate the files by combining the circles.html and login.html in Flask, but the problem still persists.
To visualize the problem, refer to this image: https://i.sstatic.net/qEsGZ.png
The CSS for Login:
.login-div{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.2);
z-index: 999 !important;
}
Circles CSS: .circles in the div containing the image of circles.
.circles{
position: absolute;
top: 0%;
left: 50%;
transform: translate(-50%, -50%);
z-index: -999 !important;
}
Only these two divs have z-index values assigned, so it seems unlikely to be a stacking order issue. Your insights on this matter are greatly appreciated.