I am facing a challenge with two images - a frame and another image that needs to fit perfectly inside that frame. The tricky part is ensuring that the layout remains responsive.
The two images are:
https://i.sstatic.net/XWsTq.png
Here is how it should appear, even after resizing:
https://i.sstatic.net/UJPTI.png
My attempted CSS:
.brawler.shelly {
background-image: url("/images/heroes/high/hero_icon_shelly.png");
background-position: center center;
background-size: 85%;
padding-bottom: 75%;
background-repeat: no-repeat;
}
.portrait {
background-image: url("/images/icons/card_common.png");
background-position: center top;
background-size: 100%;
padding-bottom: 75%;
background-repeat: no-repeat;
}
.col-4.col-md-3.col-lg-2.mb-2
.portrait
.brawler.shelly
.col-4.col-md-3.col-lg-2.mb-2
.portrait
.brawler.shelly
JSfiddle link for reference: