By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,396 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,396 IT Pros & Developers. It's quick & easy.

Alpha tranparency in Internet Explorer

P: n/a
Can someone please help me with a problem I have with using alpha
transparency in Internet Explorer. I use a php script to determine the
browser and if it is found to be Internet Explorer, the following line
appears in the style sheet:

#leftcontent,#centrecontent,#rightcontent,#banner {background-color: #fff ;
filter:Alpha(Opacity=70) ; }

For <div id="rightcontent"> (and leftcontent and banner) I get a transparent
background as required but for <div id="centrecontent"> the background is
solid white. As far as I can tell, the only significant difference between
them is that centrecontent does not have position set, while the others
have 'position: absolute'. In fact, if I add 'position: absolute' to
centrecontent the background becomes transparent but, of course, it is in
entirely the wrong place. Can anyone please suggest what might be wrong?
Here is an extract from the main style sheet:

#centrecontent {
margin-left: 200px;
margin-right: 200px;
border:1px solid #000;
}
#rightcontent {
position: absolute;
right:20px;
top:60px;
width:180px;
border:1px solid #000;
}

Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
On Thu, 06 May 2004 20:32:47 +0100, Joseph Haig
<jh***@NOSPAM.maths.man.ac.uk> wrote:
Can someone please help me with a problem I have with using alpha
transparency in Internet Explorer.


IE does not support alpha transparency. Sorry.
Jul 20 '05 #2

P: n/a
Neal wrote:
On Thu, 06 May 2004 20:32:47 +0100, Joseph Haig
<jh***@NOSPAM.maths.man.ac.uk> wrote:
Can someone please help me with a problem I have with using alpha
transparency in Internet Explorer.


IE does not support alpha transparency. Sorry.


Thanks for the reply. OK, it doesn't support it in the way I use it for
every other browser, viz using png images, but it does use it's own
propriety 'filter: Alpha(Opacity=X)' attribute in style sheets which I am
willing to use if it works properly. I suppose my question really is
whether it can be made to work properly, or whether it is a known bug in IE
that you cannot use it without 'position: absolute'?
Jul 20 '05 #3

P: n/a
Joseph Haig <jh***@NOSPAM.maths.man.ac.uk> wrote:
Neal wrote:
On Thu, 06 May 2004 20:32:47 +0100, Joseph Haig
<jh***@NOSPAM.maths.man.ac.uk> wrote:
Can someone please help me with a problem I have with using alpha
transparency in Internet Explorer.


IE does not support alpha transparency. Sorry.


Thanks for the reply. OK, it doesn't support it in the way I use it for
every other browser, viz using png images, but it does use it's own
propriety 'filter: Alpha(Opacity=X)' attribute in style sheets which I am
willing to use if it works properly. I suppose my question really is
whether it can be made to work properly, or whether it is a known bug in IE
that you cannot use it without 'position: absolute'?


It's right there in the Microsoft documentation: "An object must have
layout for the filter to render. A simple way to accomplish this is to
give the element a specified height and/or width. However, there are
several other properties that can give an element layout. For more
information on these other properties, see the hasLayout property."

The documentation for the hasLayout property lists the conditions
under which an element has layout. Having position: absolute; is one
of them. Having height and/or width defined (except for inline
elements under HTML 4.01 Strict) is another. For the rest, see

http://msdn.microsoft.com/library/de.../haslayout.asp

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #4

P: n/a
"Neal" <ne*****@yahoo.com> a écrit dans le message de
news:op**************@news.individual.net
IE does not support alpha transparency. Sorry.


But I heard that IE support one transparency color for PNG 8 ?

Jul 20 '05 #5

P: n/a
Pierre Goiffon wrote:
IE does not support alpha transparency. Sorry.
But I heard that IE support one transparency color for PNG 8 ?


http://www.alistapart.com/articles/pngopacity/

With a DirectX filter, it supports alpha transparency for PNGs. I used to
successfully use this for a "stained glass" effect logo on my churhc
website, until they designed a new logo.

It's a hideous hack, but it works.

--
Mark.
Jul 20 '05 #6

P: n/a
Joseph Haig wrote:
I use a php script to determine the
browser and if it is found to be Internet Explorer, the following line
appears in the style sheet:


Not what you're asking, but you might save your server some work on most
requests by using IE conditional comments instead.

See the source to http://billericaybaptist.net/ for an example - this makes
box model corrections for IE5 and a different set of corrections for IE6.

Other browsers ignore them.

--
Mark.
Jul 20 '05 #7

P: n/a
Harlan Messinger wrote:

<snip>

Thanks. I know this is a case of RTFM but I don't think I would ever have
found it by myself. ;-)
Jul 20 '05 #8

P: n/a
"Mark Tranchant" <ma**@tranchant.plus.com> a écrit dans le message de
news:b8*****************@stones.force9.net
IE does not support alpha transparency. Sorry.

But I heard that IE support one transparency color for PNG 8 ?


http://www.alistapart.com/articles/pngopacity/


Very informative document, thanks very mutch for the link !

Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.