我正在开发一个有两个框架的页面,左边框架是一个树形文件,当点击其中一个文件时它会显示在右边框架上。主页面代码在下面
<frameset id="main_frame" cols="210,*" rows="*">
<frame src="FramesetLeftFrame.jsp" id="treeframe" noresize="noresize"/>
<frame src="" id="basefrm" noresize="noresize"/>
</frameset>
问题是在chrome和firefox中正确显示树视图,但在ie7中树视图变为自动高度!当我单击文件夹时文件变得更高,高度变得更高。我可以解决问题?我试过添加一个min-height = 100%或height = 100%,它不起作用。 顺便说一句,树是由javascript制作的。 FramesetLeftFrame.jsp如下:
<SCRIPT src="ua.js"></SCRIPT>
<!-- Infrastructure code for the TreeView. DO NOT REMOVE. -->
<SCRIPT src="ftiens4.js"></SCRIPT>
<!-- Scripts that define the tree. DO NOT REMOVE. -->
<%@include file="buildTree.jsp" %>
</HEAD>
<BODY>
<SCRIPT>initializeDocument()</SCRIPT>
<NOSCRIPT>
A tree for site navigation will open here if you enable JavaScript in your browser.
</NOSCRIPT>
</body>
</html>
谢谢你们!
答案 0 :(得分:0)
首先,你为什么要在你的cols等中加上星号(*)?尝试删除它们:
<frameset id="main_frame" cols="210" rows="">
其次,尝试使用css内联样式来定义宽度和高度,如下所示:
<frameset id="main_frame" style="width:200px; height:400px;">...
这会有所作为吗?你当然可以在外部样式表中使用这些样式(更好的练习)并将它们链接到你的id #main_frame
答案 1 :(得分:0)
Div 100% height works on Firefox but not in IE看起来这可能会有所帮助!