I'm trying to create a responsive iframe, actually I need to create a .html that will be put in an iframe on which I can only change de Width and Height... Also if I set the height and width of this iframe to 100% I see that the iframe just cut everything is going over 200px of height...
So actually I try to make a responsive background with an image of 1920x2428px
I've it:
<html>
<head>
</head>
<body>
<div class="container" id="container" style='background: transparent url("http://slpubmedias.tf1.fr/test_nocache/test_jf/BlindSpot/Desktop/bg.jpg") no-repeat scroll 0% 0% / 100% auto; max-width:100%;width: 100%; height:100%; position: absolute;'></div>
</body>
</html>
The problem I meet is that, I set my iframe to 100% width and 2428px height, and my background to 100% 100%, but when I reduce the size of the window a white area which is the px that my background don't use anymore stay under my background, I'd like to do a:
var div = document.getElementById("container");
setInterval(function() {
divHeight = div.offsetHeight;
parent.document.getElementsByClassName('custom_device_iframe')[0].style.height=divHeight;
}, 100);
The problem is that is returns the height of the div and I'd like to get the height of the background only.