Answers for "size an iframe with website"

1

how to show iframe in full width

<div>
  <div style="position:relative;padding-top:56.25%;">
    <iframe src="https://www.youtube.com/embed/nckseQJ1Nlg" frameborder="0" allowfullscreen
      style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
  </div>
</div>
Posted by: Guest on May-22-2021
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

Browse Popular Code Answers by Language