Recently, I've been frequently using these things, so I decided to create a dedicated post to collect good code snippets related to pop-ups........ I've always been troubled by the positioning issue of JS pop-up layers, but now there's no need to worry. Different pop-up layers can be positioned using CSS, so there’s no need to set the same position for each pop-up layer in JS.