PRB: IE4 Not Displaying Background Images

Last reviewed: December 11, 1997
Article ID: Q175191
The information in this article applies to:
  • Microsoft Internet Explorer version 4.0 for Windows NT 4.0
  • Microsoft Visual InterDev, version 1.0
  • Microsoft Internet Explorer version 4.0 for Windows 95

SYMPTOMS

Pages created with Visual InterDev's DataForm Wizard do not display background images in Internet Explorer 4.0.

CAUSE

The underlying cause of this behavior is that Internet Explorer 4.0 adheres much closer to the HTML 3.2 spec than before. Per the Cascading Style Sheet (CSS) spec, CSS tags take precedence over HTML tags. Pages created using the Data Form Wizard have a reference to a cascading style sheet. The CSS has a tag for the background image of Transparent, thus overriding any value in the body tag of the ASP file.

RESOLUTION

Delete the "background: transparent;" line from the BODY property of the Cascading Style Sheet.

STATUS

Per the CSS spec, this behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create the following HTML file, making sure to reference a valid image in the background tag:

         <STYLE>
    
             BODY {
                  font: 10pt "Arial";
               margin-left: 0px;
               text-align: left;
               color: Black;
                         background: transparent;
               }
          </STYLE>
          <HTML>
          <BODY BACKGROUND="images/image.jpg">
          </BODY>
          </HTML>
    
    

  2. View the page. You should not see a background image.

  3. Delete the "background: transparent;" property.

  4. View the page. You should now see the background image.

REFERENCES

http://premium.microsoft.com/support/ie/iewin32/css/default.asp

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/vinterdev/


Additional query words: background
Keywords : VIMisc VIWizards
Technology : kbInetDev
Version : WINDOWS:1.0,4.0
Platform : WINDOWS
Issue type : kbprb


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: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.