IE filters and ASP controls

P

Pedja

Hello,
I have a problem using IE filters in ASPX page (I use VS.NET 2002 and
Windows XP). Namely, it looks like it works only if I set POSITION:
absolute for a web control. Otherwise, it doesn't work.

If I try the following HTML in my ASPX page:

<HTML>
<HEAD>
<title>WebForm3</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<asp:HyperLink id="HyperLink1" style="filter:
progid:DXImageTransform.Microsoft.Alpha(Opacity=50); POSITION:
absolute" runat="server"
ImageUrl="http://msdn.microsoft.com/library/shared/toolbar/graphics/banners/MSDN_banner.gif"
NavigateUrl="http://www.google.com">HyperLink</asp:HyperLink>
</body>
</HTML>

it shows semi-transparent image, as it should. If you only remove
POSITION: absolute
from the source code above, the image will be 100% opaque.

On the other hand, this code works properly (without absolute
positioning):

<img src="http://msdn.microsoft.com/library/shared/toolbar/graphics/banners/MSDN_banner.gif"
style="filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);">

Can anybody please advice me what is the problem here?

Thanks in advance.
- Predrag.
 
C

Curt_C [MVP]

I had similar issues with these filters. It turned out to be a space that
the IDE would mysteriously put into the code when I switched to design view.
If I only used HTML and code-behind it was fine & consistent....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top