/*we need to style the popup with CSS so it is placed as a common popup does*/ #popup { display:none; position:absolute; margin:0 auto; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; }