There are many questions answered regarding resizing iframe height according to it's content, but what if the content gets too lengthy and exceeds the height of the container. In this case I want the container height to resize accordingly and without iframe getting scrolls or trimmed in case of setting overflow to hidden. How can I do this?
Any options you have for doing this require some code control within the iframe. For example, you could support
window.postMessage() between the two iframes and the containing document could ask the iframe how large it would like to be via
window.postMessage() and when it receives the response, it could then change the iframe size.
©2020 All rights reserved.