I have an iframe
on www.example.com that points to support.example.com (which is a CNAME to a foreign domain).
I automatically resize the height of my i
1.when you change iframe's scrolling yes or no, the iframe's scrollbar dosen't show immediately, you must refresh the iframe.
2.the html tap overflow in iframe colud influence the iframe's scrollbar
3.in the IE,you must clear iframe's src,then refresh iframe ,it will be work
4.so, show you the code
html
<iframe id="main_ifrm" class="main" frameborder="0" scrolling="no" src="new.html" ></iframe>
<button id="btn1">scrolling yes</button>
javascript
var ifrm = document.getElementById("main_ifrm");
var btn1 = document.getElementById("btn1");
btn1.onclick = function(){
$(ifrm).prop("scrolling","no");
$(ifrm.contentWindow.document).find("html").css("overflow","hidden")
var src = $(ifrm).prop("src");
$(ifrm).prop("src","");
$(ifrm).prop("src",src);
}
I just ran into this problem, and discovered that the fix was to set overflow: hidden
on the HTML tag of the page inside the iframe
.
I'm assuming you've tried this, but have you set scrolling to no on the iframe?
<iframe scrolling="no">
do not use scrolling tag at-all on the iframe and add the style as style="overflow-x:hidden;overflow-y:auto;" this will remove the horizontal scroll and it should work the other way round too.
-Jai
hide iframe scrolling in chrome put body tag like this
<body style="margin:0px; padding:0px; overflow:hidden;"></body>