Home › Forums › Support › How to add overlay effect with custom text for single page featured images This topic has 11 replies, 4 voices, and was last updated 6 years, 2 months ago by Tom. Viewing 12 posts - 1 through 12 (of 12 total) Author Posts September 12, 2017 at 2:51 am #383747 Ralfs Looking for something similar to this – http://jsfiddle.net/51csqs0b/ I want to display custom text ex. “Please contact us for more images” on image as overlay when visitors hovers over image. How can I do that with current theme? September 12, 2017 at 8:05 am #383934 LeoStaff Customer Support Looks like its just simple HTML and CSS. Their method should work as it is. Let me know if you need more info. September 12, 2017 at 8:22 am #383949 Ralfs Well, how can I implement the css then? September 12, 2017 at 8:22 am #383952 Ralfs so it would be working for single posts featured images September 12, 2017 at 8:34 am #383958 LeoStaff Customer Support Ah you didn’t specify that before. Try changing .image to .page-header-image-single in the CSS and keep everything else the same. September 12, 2017 at 8:42 am #383965 Ralfs And what about “data-content=” tag? Where I should add it? September 12, 2017 at 8:53 am #383970 Ralfs Hmm, still cannot get it working. Maybe you can suggest some other method of how to add simple overlay text on img hover? September 12, 2017 at 9:20 am #383991 LeoStaff Customer Support Hmm featured image could be tricky. See Tom’s explanation here: https://generatepress.com/forums/topic/caption-for-post-thumbnails/#post-86468 One thing you can try is to add the image at the top of your content as a static image then use the More tag: https://docs.generatepress.com/article/using-the-more-tag/ Then you can use the method above exactly how it is. September 14, 2017 at 8:47 am #385381 jennifer I got this to work on my website, but I’m unsure how to implement it for mobile and tablet (touch screen). Here is my website: overflowtucson.org Any ideas? Thanks in advance! September 14, 2017 at 10:16 am #385453 TomLead Developer Lead Developer Touch events are pretty difficult when it comes to stuff like this. You can try replacing: .image:hover:after, .image:hover:before { opacity:1; } With: .image:hover:after, .image:hover:before, .image:focus:after, .image:focus:before, .image:active:after, .image:active:before { opacity:1; } September 14, 2017 at 10:22 am #385457 jennifer Hmmm…or maybe a way for an indicator to come up on mobile and tablet to click and see the overlay text? September 14, 2017 at 10:58 pm #385719 TomLead Developer Lead Developer That would require some sort of mobile tooltip script. Author Posts Viewing 12 posts - 1 through 12 (of 12 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In