CSS + FireFox: hiding scrollbar on iframe with scrolling=yes

ぃ、小莉子 提交于 2019-12-18 08:53:01

问题


I have an iframe with scrolling=yes. Is it possible to fully hide scrollbar using CSS for the Mozilla FireFox browser?

For instance, on the Internet Explorer I'm using this: Overflow-x: hidden; Overflow-y: hidden; - and it hides scrollbars, but FireFox ignores this CSS.

Here is screenshot from IE:

alt text http://moismski.com/ie.png

Here is screenshot from FireFox:

alt text http://moismski.com/firefox.png

I forgot to mention that I put CSS, to say exactly like this <style>body { overflow:hidden; }</style> inside the iframe. I can't put class to iframe itself like <iframe class="...">

Iframe is put inside the <DIV>...</DIV>. I use it like a modal window.


回答1:


Have you tried setting explicit values for width/height on either the iframe or parent container? Also, does your iFrame contain anything?

EDIT: Try:

div {overflow:hidden;}
div iframe {border:0;overflow:hidden;}

in your actual page that contains the div.




回答2:


I've tried everything you said and looked at this two links either ( How to remove scrollbars from Facebook iFrame application - facebook canvas height no scroll set in ie8 and firefox) that discuss the same problem, but it didn't work for me.

What worked for me was changing the canvas settings in the section advanced of app canvas configuration ( https://developers.facebook.com/apps ) to fixed canvas width (760px) and height (fixed at 800).

I hope this help you.



来源:https://stackoverflow.com/questions/2878188/css-firefox-hiding-scrollbar-on-iframe-with-scrolling-yes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!