I'm currently working on a project where I need to use an image frame as the background for several images. The frame I am using is similar to this:
Now, if I have an image like this one:
I want the result to look like this:
I want the background image frame to always be a fixed size (for example 300 * 400) and I want the picture inside the frame to be centered while cutting off any overhang.
So far, I have set up the following CSS for the background:
.pola {
margin-left: auto;
margin-right: auto;
background-position: center center;
background-image: url("../img/frames/frame_01.png");
background-size: contain;
background-repeat: no-repeat;
}
But I am unsure of what steps to take next. Any advice on how to achieve this?