How to always display widgets in a fixed place regardless of resolution


The red part is simply a photo and the green box in the middle is the widget.
I want the widget to always be in a red frame.
However, if the resolution is different, the widget and the frame do not fit.
How can I make the widget and the frame always fit?

I guess you could anchor them both to the same place