If you look at a the shadow mask of a color CRT, you can have a pattern like this:
Most TVs were purely analog and had knobs to move the picture horizontally and vertically. How does the green gun stay aligned with the green phosphor in an analog world?
it the deflection done by steps instead of continuously? (if that's the case this is probably not linear on flat screens?)
More confusing to me is that these TVs also have image size settings and then I wonder how it worked since, I remember these knobs beings just pots and I don't understand how the guns' beams could still be aligned with the mask.
Refer to @Briandrummond's answer for the original question. As to how the phosphor gets into the exactly correct locations (below from Phosphor Handbook 2nd Edition):
Note: Also mentioned are a Dusting Process which uses dry phosphor dust and PVA-dichromate and Phototacky process as well as several other processes. Available in the book, which is worth having on your shelf.