How to trigger close by clicking on a link

I've made it to where there's just a link to close the pop up (replaced the X with text via html and css) but it's not working as I hoped. Any suggestions?