If you are using HTML iFrame on your code you can get pretty annoyed dealing with your iframe height. Here you can get a really simple solution using CSS inline or external.
Basically you need to put your iFrame inside a Div, and with CSS give them both properties.
Here's the code
The CSS
The HTML
Basically you need to put your iFrame inside a Div, and with CSS give them both properties.
Here's the code
The CSS
.iframe-container {
overflow: hidden;
padding-top: 56.25%;/*(in this case I used 16:9 proportion 9÷16×100=56.25)*/
position: relative;
}
.iframe-container iframe {
border: 0;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
The HTML
<div class="iframe-container">
<iframe src="https://yourMovieSourceUrl.com" allowfullscreen></iframe>
</div>
Comments
Post a Comment