Without a background, and without "display: block" I guess it would act that way.
Perhaps you could add an eventListener to div2 that will wait for the mouseUp or onClick event. When that happens, you just find the X and Y of the cursor, then plot that to the X and Y of div1, and there you go!!
How would you do that? dunno...