Answers for "how to make iframe responsive height"

1

iframe 100 responsive

<style>
    .container-iframe { position: relative; width: 100%; overflow: hidden; padding-top: 56.25%; /* 16:9 Aspect Ratio */ }
    .responsive-iframe { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: 100%; border: none; }
</style>
<div class="container-iframe" data-widget="">
    <iframe src="index.html" class="responsive-iframe" frameborder="0"></iframe>
</div>
Posted by: Guest on November-06-2021
2

set iframe height and width

#IFRAME_ID {
  width: 100%!important;
  height: 100%!important;
}
<iframe src="http://www.youraddress.com" id="IFRAME_ID"></iframe>
Posted by: Guest on February-18-2021

Code answers related to "how to make iframe responsive height"

Browse Popular Code Answers by Language