Right now I have a plotly graph up on Heroku that I am trying to embed in a site via iframe. Based on what the user selects, the content can change size (height and width). I want the content to always fit inside the iframe without scrolling. The best way I can think of doing it is to zoom the inner webpage out until it's width and height are equal to or smaller than the iframe's width and height, but I'm not sure if this can be done or if it's even a good way of doing it.
I have tried using css (zoom: 0.8; etc.) but it doesn't seem to do anything. I have also tried transform: scale() and a bunch of other things, but 1) these solutions only work on the iframe itself (e.g. using scale() the iframe gets smaller, not it's content), and 2) these solutions aren't dynamic because I can't use them to change the size of the page inside. Does anyone know how I can accomplish this? Thanks in advance!
Via Active questions tagged javascript - Stack Overflow https://ift.tt/azCTM7e
Comments
Post a Comment