PRB: No Filter Applied to <SPAN>,<DIV> If Attributes Unspecified

Last reviewed: February 13, 1998
Article ID: Q181074
The information in this article applies to:
  • Internet Client SDK, version 4.0

SYMPTOMS

When a Visual Filter such as an Alpha or Blur filter is defined for a <DIV> or <SPAN> element, the filter is not applied and no visual effect is displayed.

Alternatively, when a filter defined for a <SPAN> or <DIV> element is scripted, the following scripting error is generated

   'elementID.filters.item(...)' is not an object

where elementID is the ID of the element on which the filter is defined.

CAUSE

Visual filters can be applied to DIV and SPAN elements only if they have the following style attributes explicitly defined: width, height, or absolute position.

RESOLUTION

When using a <SPAN> or a <DIV>, be sure to specify at least one of the three required cascading style sheets (CSS) attributes:

  - height,
  - width
  - position (absolute or relative)

The following example illustrates this, with the required absolute position attribute defined:

   <DIV style="position:absolute;
               top:60;
               left:20;
               color:red;
               filter: alpha(opacity=50)">
     <P style="font-size:14pt">Item #1</P>
     <UL>
       <LI>Bullet #1
       <LI>Bullet #2
     </UL>
   </DIV>

STATUS

This behavior is by design.

MORE INFORMATION

Visual filters can be applied only to HTML elements that are controls. A control element defines a rectangular space within a browser window when the browser renders the Web document. Controls cannot be windowed, such as an IFRAME. Here are the valid HTML controls:

  • BODY
  • BUTTON
  • DIV (with a defined height, width, or absolute positioning)
  • IMG
  • INPUT
  • MARQUEE
  • SPAN (with a defined height, width, or absolute positioning)
  • TABLE
  • TD
  • TEXTAREA
  • TFOOT
  • TH
  • THEAD
  • TR

REFERENCES

Internet Client SDK docs (Filters & Transitions section)


Additional query words: span div transition filter
Keywords : AXSDKIESripting AXSDKSripting
Technology : kbInetDev kbdsi
Version : WINDOWS: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: February 13, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.