align the buttom of the viewport to the buttom of an object?

Hi! Have been strugging for a while with this, cant get my hands around it.
I have 3 fixed cam positions, swiched back and forth with the scrollwheel. And lets say a cube on the scene.

My problem is that depending on the resolution, u may not end up with the camera whatching the same at a given distance (less resolution, less screen view), so insteed of moving the camera a fixed distance, would be better to align the buttom of the viewport with the buttom of the cube.

But i have no idea how to do it :D. Any idea will be appreciated.
Thx!!

I’d say that the aspect ratio is not staying constant between screens. What the camera sees should be the same for different resolutions as long as the aspect ratio is the same, otherwise you will get more of the world visible at the edges(top bottom) or sides(left right).