I have the following code that opens a new popup window while disabling the background, the problem is that I have to position this so that it\'s 100px from the top (already got
Just do this:
.body { position: relative; } .popup { position: absolute; max-width: 800px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
no matters the screen or popup size. This will center the .