Div opacity affecting the content in it

i lowered opacity of an div and now the image in the div also got opacity, i have used z-index: too but im still stuck on the same problem https://codepen.io/SirYido/pen/gOJPgxZ
3 Replies
Jochem
Jochem9mo ago
you can't, not using opacity at least the best solution is probably setting the background color to rgba(0, 0, 0, 0.5) instead, cause I think that's the only thing you're using the opacity for?
EIO
EIO9mo ago
Can even run with color-mix() where getting rgb() values is a concern.
Yido
YidoOP9mo ago
yes, that was the only thing i was gonna use it for

Did you find this page helpful?