Is the link supposed to go to a demo?
I think you’ll need to clarify what it is you’re trying to do and what part the “popup” class plays. I’m guessing that it’s part of some JavaScript that creates a custom popup/modal? As it stands, the markup is just standard HTML doing exactly what’s its supposed to do.
To be clear, please provide a demo in something like CodePen, and explain both the undesirable and desirable behaviour so we understand more about what you’re trying to do (and what you’ve already tried).