Forum Moderators: open
I use the doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
As soon as the text in the upper frame overflows vertically, both scrollbars are shown in IE, the vertical AND horizontal scrollbars.
Why does it show a horizontal scrollbar? Is there a way to prevent this?
In Firefox and Opera only the expected vertical scrollbar appears.
-------
frameset
-------
<html>
<head>
</head>
<frameset rows="*,22" border="0">
<frame name="board" src="up.html" frameborder="0">
<frame name="bar" src="bottom.html" frameborder="0" noresize>
</frameset>
</html>
-------
up.html
-------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
hi there <br/>
hi there <br/>
hi there <br/>
hi there <br/>
(... enough to overflow vertically)
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
It doesn't when using no doctype at all or with:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
A thread about the same problem: [lists.evolt.org...]
Solution:
[lists.evolt.org...]
So setting my body's width to 95% did the job:
body
{
width:95%;
}
IE's rendering engine seems, at times, to assume that the vertical scrollbar space is PART of the available width, which makes another part of the rendering engine think you need a horizontal scroll bar when you don't. The body {width:95%;} usually gets rid of the scrollbar problem, but sometimes that bug fix messes with other elements in the layout.
You may be able to fix the problem by reverting to quirks mode. To do this remove the url from the doctype. This fixes the problem on most of my site but there are still a few rogue pages.
Of course, using quirks mode may be out of the question.
Kaled.