I have a div on top of my slider like this
In my mobile version I want to center it and i spent 2 hours trying to figure out how , without using a specific value for the margins.
The relevant css code is here
/* Web version */
.img-slide .advert {
position: absolute;
top: 60px;
left: 70px;
width: 610px;
height: 170px;
}
/* mobile version */
.img-slide .advert {
height: 120px;
width: calc(100% - 90px);
background-color: rgb(166 187 91 / 0.60);
}