Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html IE为框架中的滚动条保留空间_Html_Css_Internet Explorer - Fatal编程技术网

Html IE为框架中的滚动条保留空间

Html IE为框架中的滚动条保留空间,html,css,internet-explorer,Html,Css,Internet Explorer,我有一个框架集,每个框架都有一个宽度为100%的表。在IE8和IE9中,表格并没有填满整个窗口,而是有一个奇怪的右边距。在所有其他浏览器中,它都运行良好 我确认它与边距/填充无关,与滚动条有关,因为如果我在控制面板中更改滚动条宽度,保留空间也会更改。如果在框架外查看页面,则不会发生此问题 这是lagacy代码。每个帧都有滚动=自动。从互联网上,我看到了两个相关的讨论: 然而,我仍然找不到解决办法。将scroll=no添加到页面正文将消除空间,但这会阻止滚动条在需要时显示。我尝试了一些其

我有一个框架集,每个框架都有一个宽度为100%的表。在IE8和IE9中,表格并没有填满整个窗口,而是有一个奇怪的右边距。在所有其他浏览器中,它都运行良好

我确认它与边距/填充无关,与滚动条有关,因为如果我在控制面板中更改滚动条宽度,保留空间也会更改。如果在框架外查看页面,则不会发生此问题

这是lagacy代码。每个帧都有
滚动=自动
。从互联网上,我看到了两个相关的讨论:

然而,我仍然找不到解决办法。将
scroll=no
添加到页面正文将消除空间,但这会阻止滚动条在需要时显示。我尝试了一些其他的解决方案,但还没有找到一个完全有效的

编辑:这仅发生在垂直分割帧中

示例代码:

index.html

<html>
<frameset rows="150,*" cols="*"  framespacing="0" border="0" frameborder="no">
<frame scrolling="auto" noresize src="top.html" name="menu">
<frame scrolling="auto" noresize src="bottom.html" name="main">
</frameset>
</html>

top.html

<html>
<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 bgColor="#AAFFAA">
<table cellspacing=0 cellpadding=0 width="100%" border=1>
<tr>
<td width="100%" align=middle>TOP<td>
</tr>
</table>
</body>
</html>

顶部
bottom.html

<html>
<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 bgColor="#FFAAAA">
<table cellspacing=0 cellpadding=0 width="100%" border=1>
<tr>
<td width="100%" align=middle>bottom<td>
</tr>
</table>
</body>
</html>

底部

对不起,我不能就这个问题发表评论

您是否尝试用一个新的流替换滚动


尝试添加样式
overflow:auto:
overflow-x:auto;溢出y:隐藏

发布您的代码/站点将有助于解决方案。是的,它可以工作。你介意在你的回答中加上我的发现吗?最后,我发现在子页面的body元素上添加
style=“overflow:auto”
可以解决这个问题。