You can't perfectly stack minerals or anything for that matter in Starcraft Xtra editor. To perfectly stack things one on top of the other download either
Starforge and place 1 mineral patch wherever you'd like. Then select it and right click it and choose stack. Then type in how many you'd like to be stacked and hit enter. You'll have that amount of minerals stacked perfectly.
You can do the same for gas.