For now just consider two elevators. Both are inertial but have a relative vertical motion with respect to each other. Each has his own light source. According to each his light travels straight across and hits the opposite wall at the same height above his floor as it was fired from. Where each elevator's own light hits its own wall is not something that can be disagreed about as far as the observers in either elevator is concerned. If elevator A says the light strikes a given point on its wall, then the observer in elevator B must agree that it strikes that same spot on elevator A's wall. But elevator A is moving with respect to elevator B. So let's say that at the moment the light is emitted in elevator A, the source is 1 meter higher than the floor of Elevator B. That means that at that same instant, the spot on A's wall where it will strike is also 1 meter above B's floor. But in the interval that it takes the light to cross Elevator A, Elevator A, along with that spot on the wall has moved with respect to Elevator B and and the spot will no longer be 1 meter above the floor of B. Thus it leaves one height with respect to B's floor and arrives at a different height above B's floor.
This also makes sense when seen from the respect of Elevator A. Its light goes straight across, and at the moment of emission is a distance from the floor of B, but in the time it takes the light to cross Elevator A, Elevator B, along with its floor has moved and thus when the light reaches the other wall, the distance between it and the floor of B has changed.