开发者

`overflow:hidden` not hiding scrollbars in Chrome & IE

开发者 https://www.devze.com 2023-03-09 00:49 出处:网络
Check out http://jsfiddle.net/YRP7Z/ in different browsers. I ha开发者_开发百科ve added overflow:hidden to both the div anf iframe but still, scrollbars are appearing in Chrome & IE7-8. Working f

Check out http://jsfiddle.net/YRP7Z/ in different browsers.

I ha开发者_开发百科ve added overflow:hidden to both the div anf iframe but still, scrollbars are appearing in Chrome & IE7-8. Working fine in FF4.

Any clues?


To fix the problem in chrome you can simply add the scrolling="no" attribute to the iframe :

<html>
    <body style="background-color: tan;">
        <div id="DOMWindow" style="">
            <iframe id="DOMWindowIframe" frameborder="0" src="http://www.yahoo.com" scrolling="no">
        </div>
    </body>
</html>
0

精彩评论

暂无评论...
验证码 换一张
取 消