0

As you can see, my iframe height adjustment is not working while "width 100%" is okey.

Sample iframe post

I tried to add some different codes in template and in post, but as an ordinary blogger user, I could not make it.

Thanks for help!

Ahmet
  • 15
  • 4
  • Possible duplicate of [Adjust width height of iframe to fit with content in it](https://stackoverflow.com/questions/819416/adjust-width-height-of-iframe-to-fit-with-content-in-it) – Nuwan Alawatta Jul 05 '18 at 21:34
  • Thanks for comment! I tried first solution, but it did not worked for me. I mean, I added script to my template and this was all i can do according to my coding experience :(. I did not even understand other solutions. – Ahmet Jul 06 '18 at 09:09

1 Answers1

0
<div style="max-width: 800px; max-height: 800px;">
<div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.3%; overflow: hidden;">
<iframe src="YOURLINK"
             allowfullscreen
             style="position: absolute; top: 0px; left: 0px; height: 100%; width: 1px; min-width: 100%; *width: 100%;"
             frameborder="0"
             scrolling="no">
</iframe>
</div>
</div>

I solved my problem thanks to this code. It is arranging the "hight" responsively and you can adjust the content dimensions additionally.

Ahmet
  • 15
  • 4