BUG: <DIV> tags are positioned incorrectly in IE 4.01

Last reviewed: March 19, 1998
Article ID: Q182688
The information in this article applies to:
  • Microsoft Internet Explorer (Programming), version 4.01

SYMPTOMS

Placing two <DIV> tags on a Web page with relative positioning causes the second <DIV> to be positioned to the right of the first. In Internet Explorer 4.0, the second <DIV> is positioned below the first.

RESOLUTION

Place a <BR> or <P> tag after the first <DIV> tag.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Load the following HTML into Internet Explorer 4.01:

          <HTML>
          <BODY>
    
             <DIV ID=one STYLE="position:relative;width:200"
                onclick="document.all.two.style.display = '';">
             Div One
             </DIV>
    
             <DIV ID=two STYLE="position:relative;width:200;display:none">
             Div Two
             </DIV>
          </BODY>
          </HTML>
    
    

  2. Click "Div One."

Result: "Div Two" is displayed to the right of "Div One" off the screen. If you resize the application's window, it repositions to below "Div One."

Expected Behavior: "Div Two" should be displayed below "Div One." This worked in Internet Explorer 4.0.

Placing a <BR> or a <P> after the first </DIV> corrects this problem but places an extra line break between the two <DIV> tags. This HTML works correctly:

   <HTML>
   <BODY>
      <DIV ID=one STYLE="position:relative;width:200"
         onclick="document.all.two.style.display = '';">
      Div One
      </DIV>

      <BR>

      <DIV ID=two STYLE="position:relative;width:200;display:none">
      Div Two
      </DIV>
   </BODY>
   </HTML>

REFERENCES

Dynamic HTML section of the Internet Client SDK Help:

   http://www.microsoft.com/msdn/sdk/inetsdk/help

Keywords          : AXSDKIESripting
Technology        : internet kbInetDev
Version           : WINDOWS:4.01
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbpending


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.