Rewrite overlay centering. For "fixed" overlay positioning it uses 50% for left and top and margins in pixels (so now it stays centered on window resize). For "absolute" positioning it uses the old positioning in pixels.