Streaming live at 10am (PST)

How to center modal window and use a video inside it


I wonder if anyone can answer these questions?

  1. How do I make a modal window appaer at the center of the webpage when shown?
  2. Im using a Vimeo video inside my modal window. Is there anyway to make sure that the video does not continuing to play when i close the modal window?

I appreciate all answers :smiley:

@PixelGeek I don’t think this was the issue.
@Daniel_Remes Once your modal is created you can set it’s top value depends on the browser height. You can do that using the following script wchich you should put in the Custom Code in before </body> in site settings.

If you have followed @thesergie tutorial provided here also by @PixelGeek you should find following line of code: $('.modal-background').fadeIn(); and above it write something like this:

$('.modal-window').css('top', $(window).height()/2 - $('.modal-window').height()/2);

Things are getting different if you want to create a full responsive modal window. This one might be easier to hire a freelancer for that if you are not familiar with coding.

I’m not sure about the second question. I’ll try to find a way for that. Remind me please with email about that. Detaisl are in my profile.

Thanks @bartekkustra :smile:

I do however only get my modal to pop up a bit down and not exactly at the center of the window… I dont have any paddings in the modal background or the modal window.

Any idea?


Could you please give a troubleshooting link?