Do you want it to stay in the same spot or do you want it to stay centered?
For centering inline elements like images you need to apply
to the parent. Centering block-level elements like divs is easy if you assign a specific width to them and set left and right margin to “auto”.
And by the way:
Please don’t do that. For what do we have CSS?