Hello all,
I'm trying to embed a video, I would like it to respect its ratio and crop the height to a 1/3
I've attached a pic... I've tried so many scripts, CSS and DIVs, I'm turning to forum maybe I'm missing something?
Is there a javascript I can try?
Here's the last one I tried
Thx
<div class="videoContainer">
<iframe class="videoContainer__video" width="1920" height="1080" src="
" frameborder="0"></iframe>
</div>
CSS
.videoContainer {
position:relative;
overflow:hidden;
width: 100%;
height: 100%;
top: 0;
left: 0;
bottom: 0;
right: 0;
display: flex;
flex-direction: column;
justify-content: relative;
align-items: center;
}
iframe {
/* optional */
width: 100%;
height: 100%;
}
I'm trying to embed a video, I would like it to respect its ratio and crop the height to a 1/3
I've attached a pic... I've tried so many scripts, CSS and DIVs, I'm turning to forum maybe I'm missing something?

Is there a javascript I can try?
Here's the last one I tried
Thx
<div class="videoContainer">
<iframe class="videoContainer__video" width="1920" height="1080" src="
</div>
CSS
.videoContainer {
position:relative;
overflow:hidden;
width: 100%;
height: 100%;
top: 0;
left: 0;
bottom: 0;
right: 0;
display: flex;
flex-direction: column;
justify-content: relative;
align-items: center;
}
iframe {
/* optional */
width: 100%;
height: 100%;
}
Attachments
-
119.9 KB Views: 2