Responsive Modal with Overlay

User 2023679 Photo


Registered User
141 posts

Has anyone successfully added a responsive Modal with an overlay to an RSD project? What I'd like to create is a simple text box that 'pops up' with an overlay and that has a 'close' button of some sort. So, like a responsive Lightbox for photos, only with text instead. And mostly cross browser compatible if possible.

I've done quite a bit a searching and most of what I've found is either too difficult to implement or doesn't play well with RSD.

Any suggestions?
User 187934 Photo


Senior Advisor
20,196 posts

Use a span and then position it where needed in the modal.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2023679 Photo


Registered User
141 posts

Thanks Eric. I think I understand, and that will help. At the moment I'm still in search of the code for the modal that does the pop up. I've done a lot of search on Google and not coming up with much that looks like it will work. Sorry I wasn't more clear on what I needed. So, step one is to get the right code to insert in an HTML element and then I can work on making it play well with RSD (with help of course). :)
User 187934 Photo


Senior Advisor
20,196 posts

Use lightbox.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2023679 Photo


Registered User
141 posts

I have Visual Lightbox software, but I've only been able to do photos with that so far and am not aware of a way to do text with it. I'm guessing you may be talking about one of the other lightboxes out there?
User 2023679 Photo


Registered User
141 posts

Okay, I did search for lightboxes that would handle text. I found this one . . .

http://responsivebp.com/v2/javascript/lightbox.html

I did a test on a new RSD file, which worked, and then did a test in my RSD web site I'm working on, and it worked on that too. It is easy to add to RSD. My main concern now is cross browser compatibility. That's always the kicker, eh? :)

I will post a test page when I get a chance here.

User 2023679 Photo


Registered User
141 posts

Here's the test page I did with the lightbox modal 'pop up' code I found. . .

http://brosepianoservice.com/testimonials-kits.html

Click on the text in blue letters beneath the photos that say, "Comments", and the text modal will 'pop up'. Each one is different and has the comments that go with the photo above it.

The only thing I don't like about it is that you can not close the modal 'pop up' by hitting escape or clicking outside of the modal. It can ONLY be closed by clicking the 'click to close' button. Can anybody tell me if that is a big problem per se, or would it be okay to have it work that way on my website, with that being the only way to close the modal?
User 2088758 Photo


Senior Advisor
3,091 posts

Thanks for sharing Michael! Your site is coming along nicely, love the colors!

I think I may just bookmark that page as there are a lot of lightboxes I may use in the future. Nice Find!

Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 2023679 Photo


Registered User
141 posts

Thanks Steve. I consider that high praise coming from you (you do some very nice websites!).

Yes, that page of lightboxes has some interesting stuff on it.

I did learn something about modals, when I finally looked up the definition. I initially just thought it was a fancy word for a pop up text box. By definition, a modal will not close except by using the close button. It stops the progress on the page until the call to action has been achieved. So it is supposed to work the way it does. Learn something new every day. ;)

So then, I finally found the code I needed on that same page. They call it 'Internal Target'. In any case, with that code I can make a pop up text box that will close with escape, clicking outside the text box, or clicking on the 'X' at the top right corner. I like that much better for the page I'm working on.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.