• 0
Sign in to follow this  
Followers 0

DMS 2 How can I have a responsive youtube-embed inside a modal?


Question

Posted · Report post

Hi!

When I insert a youtube-embed inside a modal, it won't work. I tried to have:

 

 <div class=" fitvids">
        <iframe  src="//www.youtube.com/embed/88NV75YRAnc?&iv_load_policy=3&theme=light&color=red&rel=0&showinfo=0&autohide=1&enablejsapi=1" frameborder="0"  allowfullscreen></iframe>
      </div>

But that won't work on mobile either.

Thank you!

 

Share this post


Link to post
Share on other sites

4 answers to this question

  • 0

Posted · Report post

Yeah, I mentioned above you have to change the height of the modal via CSS.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

Why won't it work ? I have just added the following to a modal shortcode and it works, but the modal body classes needs its height via CSS adjusting.

 

[pl_modal title="Title" type="btn" colortype="info" label="Click Me!"]<div class=" fitvids"><iframe src="//www.youtube.com/embed/88NV75YRAnc" frameborder="0" allowfullscreen></iframe></div>[/pl_modal]

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Ahh, apologies. 
It would of course be better if it would work without such customization, since it means either tons of media queries or black bars in several screen sizes. But I'd assume this is the default bootstrap modal as it is. 
Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0