• Resolved Ninjamankid

    (@ninjamankid)


    Hi,

    Is there a way to get a Youtube video responsive inside a popup?

    Youtube video gets embedded with this code:

    <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/myvideo&#8221; frameborder=”0″ allowfullscreen></iframe>

    There is no responsiveness in an Iframe, so I tried this to get the video follow browser window resizing:

    <div class=”video-container”><iframe…….></iframe></div>

    .video-container {
    position:relative;
    padding-bottom:56.25%;
    padding-top:30px;
    height:0;
    overflow:hidden;
    }

    .video-container iframe, .video-container object, .video-container embed {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    }

    but it doesn’t work. Video won’t resize. Any ideas would great. 🙂

    Johan

    https://ww.wp.xz.cn/plugins/popups/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Embed Youtube video not responsive’ is closed to new replies.