The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Having trouble linking files together Reply To: Having trouble linking files together


My issue is when I click on the first html file it opens up in the same tab…

That’s because it’s a standard hyperlink to beginnermensdescription2.html (that’s all your code says it is anyway).

…but it just shows a “SELECT OPTION” and only when I click on it the open modal opens up.

We can’t comment. We can’t see the modal code that’s on the second page (you haven’t provided it).

How should I set up my code so when I click on the beginnermensimage.jpg the open modal pops up while still showing the rest of the page in the background?

Try merging the contents of the second page (beginnermensdescription2.html) into the demo? It’s impossible to say without knowing what’s in that second page though.

As it stands, the beginnermensimage.jpg is currently set up as a straight link to beginnermensdescription2.html. I would expect to see some sort of accompanying JavaScript and CSS to make a modal overlay – or even just CSS if the modal is being triggered by the :target selector. If that already happens in beginnermensdescription2.html, take your cues from that.