I am using an iframe which is displaying a list, the list is quite tall vertically. I have set the iframe's height to be 600px
, so on desktop it displays that height and one can scroll down through the content.
The problem is, when viewing my site on mobile, the iframe gets expanded to its full height (no longer 600px with scrolling).
My iframe:
<iframe src='url' width='360' height='600'></iframe>
my css:
iframe {
border: 1px solid black
padding: 3px;
height: 600px;
overflow: scroll;
}
I have tried surrounding my iframe with a div
as follows, referenced from this question, which is a slightly related problem, but it still expands.
<div style="overflow:auto; -webkit-overflow-scrolling:touch">
<iframe src='url' width='360' height='600'></iframe>
</div>
How can I prevent the iframe from expanding on mobile? Is this even possible?