Well when you hold x it should snap to axis. Make sure you are holding x before you click to move them...another way to do it is to click on the snap to axis button on the shelf...