I know a lot of people have asked this question and I've tried everything, but none of the solutions have worked for me. I'm creating a front-end portal in ServiceNow and need to pull in multiple iframes of varying heights. I would like the iframe heights to be dynamic based on the content.
I am using a method that seems to be pretty popular on this site:
<div class="grey">
<div class="container">
<div class="row">
<div class="fluidMedia">
<iframe src="my-page" frameborder="0" ></iframe>
</div>
</div>
</div>
</div>
.fluidMedia {
position: relative;
padding-bottom: 56.25%; /* proportion value to aspect ratio 16:9 (9 / 16 = 0.5625 or 56.25%) */
padding-top: 30px;
height: 0;
overflow: hidden;
}
.fluidMedia iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
After trying this, I still have to scroll on my iframe as seen in my screenshot:
Any thoughts?