layers positioning correctly when window is resized