FIX: Internet Explorer Stops Responding When You Resize the Browser Window (270123)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5.01

This article was previously published under Q270123

SYMPTOMS

When you resize a Web page that contains a nonscrolling frame and specific style sheet properties, Internet Explorer may stop responding (hang) or stop completely (crash).

CAUSE

This problem occurs under the following frame conditions:
  • When you set the width of one of the frames to zero.
  • When you specify the SCROLLING=NO attribute on the frame.
  • When the contents of the frame contain style sheet properties that specify the widths of certain elements.

RESOLUTION

To resolve this problem, you can use one of the following methods:
  • Remove the SCROLLING=NO attribute from the frame.
  • Modify the style sheet properties as described in the "More Information" section.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Internet Explorer 5.5.

MORE INFORMATION

This problem can occur if all of the conditions in the "Cause" section are met, with the following specific style sheet conditions:
  • The page contains nested elements that have specified widths; for example SPAN elements with specified widths that are enclosed within a DIV element with a specified width.
  • The total width of the enclosed elements is less than or equal to the enclosing element.
  • The width of the enclosed elements, plus the width of the left and right borders of the enclosing element (which is zero by default), plus one for each enclosed element is greater than the width of the enclosing element.
The problem occurs because one pixel must be added to the width of the outer element for every enclosed element.

Steps to Reproduce Behavior

  1. Create a file named Frameset.htm, and paste the following HTML code:
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <frameset cols="0,*" frameborder="0" border="0" framespacing="0">    
    	<frame src="frame.htm" scrolling="no">
    	<frame src="frame.htm">
    </frameset>
    </HTML>
    					
  2. In the same folder, create a file named Frame.htm and paste the following code:
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <STYLE>
    #div1
    {
        HEIGHT: 100px;
        WIDTH: 150px;
        background: blue;
    }
    #spn1
    {
        WIDTH: 50px;
        border: 1px solid pink;
        background: green;
    }
    #spn2
    {
        WIDTH: 50px;
        border: 1px solid pink;
        background: yellow;
    }
    #spn3
    {
        WIDTH: 50px;
        border: 1px solid pink;
        background: purple;
    }
    </STYLE>
    </HEAD>
    <BODY>
        <DIV ID="div1">
    	<SPAN ID="spn1"></SPAN>
    	<SPAN ID="spn2"></SPAN>
    	<SPAN ID="spn3"></SPAN>
        </DIV>
    </BODY>
    </HTML>
    						
    NOTE: Although the above content appears in the visible, right frame for reference only, the problem is caused by the invisible, left frame.
  3. In Internet Explorer 5.01, open Frameset.htm.
  4. Resize the window, and Internet Explorer either hangs with high CPU usage or crashes.
To correct this problem, make one of the following changes:
  • In the Frame.htm file, add three to the width of the outer DIV tags (one pixel for each of the contained SPAN elements). In other words, the Width property of the #div1 style should be 153 pixels, instead of 150. -or-

  • In the Frameset.htm file, remove the SCROLLING=NO attribute from the left frame.

Modification Type:MajorLast Reviewed:11/6/2003
Keywords:kbBug kbfix kbie550fix KB270123