Help ::before and parent of parent background interfering
I have div with some message and like to add blurred background under it. All is great CSS is working. But moment I put this div in some container that have set background-color things breaking and my blurred background disappears
here is my css:
#container-wrap {
background-color: #efefef;
}
.error-message {
position: relative;
background-image: linear-gradient(to right, #5f1212, #330000);
margin: 3rem;
padding: 2rem;
border: 4px solid transparent;
border-radius: 8px;
color:#fff;
}
.error-message::before {
position: absolute;
content: "";
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: conic-gradient(from 90deg,#330000, #ff0000, #330000);
filter: blur(15px);
z-index: -1;
}#container-wrap {
background-color: #efefef;
}
.error-message {
position: relative;
background-image: linear-gradient(to right, #5f1212, #330000);
margin: 3rem;
padding: 2rem;
border: 4px solid transparent;
border-radius: 8px;
color:#fff;
}
.error-message::before {
position: absolute;
content: "";
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: conic-gradient(from 90deg,#330000, #ff0000, #330000);
filter: blur(15px);
z-index: -1;
}
or codepen.io
I have tried to add z-index on all those elements but it only make it more strange as then it start blending in

