youtube - HTML Embedded video cut off -


i trying embed video youtube site. wondering if there way relate width , height based on window size. example, on iphone looks this. can make video shrink in width smaller display size? can tie in responsive site somehow, that?

it works great on computers or other larger screened devices, not mobile.

source:

<center><iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/zrdi1dt3afa?rel=0" frameborder="0" allowfullscreen></iframe></center> 

full page source

thanks help!

[edit: source]

it possible embed youtube videos responsive overriding youtube style (css).

add following css:

.video-con {     position: relative;     padding-bottom: 56.25%;     padding-top: 30px;      height: 0;      overflow: hidden; }  .video-con iframe, .video-con object, .video-con embed {     position: absolute;     top: 0;     left: 0;     width: 100%;     height: 100%; } 

and wrap iframe div:

<div class="video-con">   <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/zrdi1dt3afa?rel=0" frameborder="0" allowfullscreen></iframe> </div> 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -