开发者

why the height of a frame is not constant in ie7 [duplicate]

开发者 https://www.devze.com 2023-01-11 22:27 出处:网络
This question already has answers here: Div 100% height works on Firefox but not in IE (8 answers) Closed 2 years ago.
This question already has answers here: Div 100% height works on Firefox but not in IE (8 answers) Closed 2 years ago.

i was developing a page which has two frames, the left frame is a treeview file, when click one of the file it will display on the right frame.the main page code is below

<frameset  id="main_frame" cols="210,*" rows="*">
            <frame src="FramesetLeftFrame.jsp" id="treeframe" noresize="noresize"/&开发者_开发技巧gt;
            <frame src=""  id="basefrm" noresize="noresize"/>
</frameset>

the question is the treeview display correctly in chrome and firefox, but in ie7 the treeview becomes auto-height!when i click a folder with the files becomes more the height becomes higher.how can i fix the problem? i have tried add a min-height = 100% or height = 100%,it does not work. by the way, the tree is maked by javascript. FramesetLeftFrame.jsp is below:

  <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>

Thank you guys!


First off, why have you added the asterisk (*) to your cols etc?? Try remove them:

<frameset  id="main_frame" cols="210" rows="">

Secondly, try using css inline styles to define your width and height like so:

<frameset  id="main_frame" style="width:200px; height:400px;">...

Does that make a difference? You could of course have those style in an external style sheet (better practice) and link them to your id #main_frame

0

精彩评论

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