How to remove iframe's scrllbars? In Firefox it's easy, however I fou开发者_运维知识库nd myself unable to achieve this effect to be compatible with all major browsers.
If the CSS technique isn't working for you, try also adding the property scrolling="no"
to the iframe
HTML tag.
<iframe scrolling="no" src="..." >
CSS
iframe {
overflow: hidden;
}
And/or use Coin_op's answer, it seems to be better.
on top of Alex's answer, I also had to add the following to remove horizontal toolbars from both FF and Chrome. This was added in the i-frame page, even though it should be possible to add it in the css as well:
<style>
iframe::-webkit-scrollbar {
display: none;
}
</style>
<iframe runat="server" id="_theFrame" src="url" width="100%" scrolling="no" height="200" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" style="display: block; background: none repeat scroll 0% 0% transparent; width: 100%;" />
精彩评论