I have a iframe placed into a script editor.
When the height of the iframe is set to 100% the images all size correctly but the script editor web part does not.
How can I get the editor to mach the size of the content inside it?
EDIT: This will resize the iframe to take half of the window size on load. A few tweaks are needed to correct it.
<script type="text/javascript">
function resize_iframe()
{
var height=window.innerWidth;//Firefox
if (document.body.clientHeight)
{
height=document.body.clientHeight;//IE
}
//Resize the iframe according to the size of the
//window (all these should be on the same line)
document.getElementById("iframe").style.height=parseInt(height-document.getElementById("iframe").offsetTop-8)/2+"px";
}
// This will resize the iframe every
// time you change the size of the window.
window.onresize=resize_iframe;
</script>