Aligning to a corner whitin 'fit to bounding box'

I’m looking for a way that I can align a picture to the corner of a bounding box in stead of always being in the middle of the box.

Product:

Using Wix Studio with Code and tried the CSS options too.

What are you trying to achieve:

In the screenshot it will be quite clear I think. I have 4 pictures arranged in a squared grid and I want the picture to be alligned to the corners in the middle of the square. I have a random picture selection with portrait and landscape pictures. (about 100 different pictures, so no way I’m doing this manual)

What have you already tried:

I’ve searched on different places and cannot find any solution. In CSS there is no option for the alignment within the bounding box…

your alignment looks correct but you may have the image setting - display mode set to ‘keep ratio ratio’ . It would need to be changed to fill or fit.

1 Like

Hi Dan, thanks for your response. I just learned today that the issue I’m trying to solve is something that is not (yet) implemented. The Keep Image Ratio setting along with the docking settings are usually sufficient, but in my case, if the images are swapped out for random ones after the page loads with code, it doesn’t look the way I want too. The portrait images will be centered and smaller (when fit is applied) or cropped (when fill is applied).

Anyway the problem is now a request that has been send to the developers.

(If anyone knows a way around it within code I would love to hear it)