Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Text pop up when you click a picture

Started by Lea S 6 years ago · 1 replies · 2841 views
6 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?

6 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 Jerry Hunt, 4 days ago
2 133 1 day ago
General · by pamtbaau, 1 day ago
1 93 1 day ago
General · by Andy Miller, 2 days ago
0 77 2 days ago
General · by Marcel, 12 months ago
6 387 5 days ago
General · by Duc , 6 days ago
3 72 6 days ago