开发者

<applet height="100%"> causes vertical scrollbar in IE. Why/how to avoid?

Why does this create a veritcal scrollbar in IE6, IE7 and IE8? How to avoid it?

(I had a real applet in there, but I discovered that this heavily mutilated one gave the same result and helps simplify the test case)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loos开发者_Go百科e.dtd">
<html>
<head>
    <title>Why vertical scrollbar in IE?</title>


    <style>
        HTML, BODY {
            height: 100%;
        }

        BODY {
            padding:0;
            margin:0;
        }

        /* And yes I can use this, but I'd rather not
        BODY {
            overflow-y: hidden;
        }
        */
    </style>
</head>
<body>
     <APPLET  WIDTH = "100%" HEIGHT = "100%"></APPLET>
</body>
</html>

Above also available as http://www.morch.com/download/ieVerticalScrollbars.html


applet {
    display: block;
}

To prevent rendering the applet as an inline-element, which enforces line-height rendering.


Add position: absolute; to the applet's style.


Try bringing the height down to 99% or 98%. Or try throwing in some more thorough reset CSS. Don't ever use overflow-y on a body element. Terrible usability.


Thing 1 -- CSS/overflow

Here are the CSS settings you can work with (if they help): http://www.w3schools.com/Css/pr_pos_overflow.asp

Thing 2 -- CSS-erize the scrollbar itself (i.e., turn it completely white, or whatever works for your page.: http://www.draac.com/css/csstricks.html (scroll down a ways)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜