Here is a nice example for you.
will look like this:
The blue border is a container, having class playingboard. You won - you lost is wrapped in a container ‘gamestatus’, You won has class ‘won’, you lost has class ‘lost’
and the scss look like this:
.playingboard {
width: 80%;
height: 80%;
// border: 3px rgb(122, 122, 122) solid;
padding: 5px;
margin: 10%;
.mx-templategrid-item {
padding: 2px;
}
.singlefield {
margin: 1px;
width: 100%;
height: 100%;
// border: 3px rgb(216, 216, 216) solid;
}
.gamestatus {
position: absolute;
margin:20%;
width: 40%;
font-size: xx-large;
opacity: 85%;
z-index: 1;
border-radius: 33px;
.lost {
color: red;
background-color: #ffdddc;
}
.won {
color: green;
background-color: #cbffcb;
}
}
Would this help you more to understand the concept?
https://www.w3schools.com/howto/howto_css_image_overlay_title.asp