Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Text pop up when you click a picture

Started by Lea S 7 years ago · 1 replies · 3495 views
7 years ago

Hey,

does anybody know a simple way to make text pop up when you click on a picture?

I want to make a quizz with 4 pictures that can be clicked on.
when you choose the right picture, there should be a "yes you're right" popup and when you click one of the other pictures, there should be a texp popping up saying that they're wrong.

Is this possible with minor knowledge of html/ css?

7 years ago

@lsprnk, A search with Google returned the following sample: Pure css popup box - CodePen. Follow the link and see the popup in action.

If you replace:

HTML
<a class="button" href="#popup1">Let me Pop up</a>

with:

HTML
<a class="button" href="#popup1"><img src="path/to/image"></a>

You should have an image that shows a popup when clicked.

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 1 day ago
2 41 18 hours ago
General · by Hanns Mattes, 1 week ago
0 122 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago