WebSite X5Help Center

Mohamed F.
Mohamed F.

IFrame height responsive  en

Autor: Mohamed F.
Visited 509, Followers 1, Udostępniony 0  

I need to make the height of the Iframe responsive according to the user screen resolution, as the width alraedy works automatecly but the height keep fixed so on small screens I got a large empty space between this cell and the bellow one.

This is the link of my project:

This is the link that I call in my Iframe:

Thanks in advance.

Posted on the
Stefano G.

Hi Mohamed

I can confirm that at the moment, there is no such default option inside the software to configure the iFrame to be as tall as the whole page and you would mandatorily need to rely on custom code to achieve such result

Unfortunately, the Staff cannot provide support for this custom code, but I will leave the topic open anyway so that other users might eventually stop by and help you out with this

I apologize for not being able to help further, but let me know here if I can be of help for something else

Thank you


Czytaj więcej
Posted on the from Stefano G.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪

(It > En) ... you can freely use an extra original code of my exclusive invention, to be pasted into the custom code expert panel, before closing the tag / HEAD, or in the same object HTML code of the IFRAME:

... code IFRAME:

<iframe id="iframeK" src="" frameborder="0" style="position:absolute;top:0px;left:0px; width:100%;height:873px"></iframe>

... code JS:

<!-- =========== K ========== -->
<script>function h_rowK(){
var ww =1920; // larghezza finestra;
var hh =843; // altezza finestra;
var wrowk = document.getElementById('imPage').offsetWidth;
var hiframe=Math.round(wrowk*hh/ww);
document.getElementById('imHTMLObject_26').style.height=hiframe + "px";
document.getElementById('iframeK').style.height=hiframe + "px";}
window.onload = function () {h_rowK();}
window.onresize = function () {h_rowK();} </script>
<!-- =========== K ========== -->




Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪