I generate an iframe with Vaadin 7 and the result is:
<div class="zoom-to-fit" style="width: 1200px; height: 900px;">
<iframe src="http://localhost:8090/image.png" frameborder="0" width="100%" height="100%">
</iframe>
</div>
I can add a style class zoom-to-fit
to the iframe, but the iframe is wrapped inside a div.
I am trying to stretch the image to the iframe, but it does not work.
I tried the following:
.zoom-to-fit {
width: 100%;
height: 100%;
}
.zoom-to-fit {
background-size: 100% 100%;
}
.zoom-to-fit > html > body > img {
width: 100%;
height: 100%;
}
But they don't work.
I added the last one because the html code in the developer tools looks like:
I guess I cannot modify any styles inside the iframe... but how could I resize the image?
I know that if I go to the image and add the first style (width and height at 100% works) but I can only add or remove styles with the Vaadin framework I am using.