<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CSS Opacity in Internet Explorer (IE)</title>
	<atom:link href="http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/feed/" rel="self" type="application/rss+xml" />
	<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/</link>
	<description>cat /dev/random</description>
	<lastBuildDate>Sat, 04 Jul 2009 08:07:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Oxin</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-885236</link>
		<dc:creator>Oxin</dc:creator>
		<pubDate>Tue, 02 Jun 2009 14:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-885236</guid>
		<description>Just fyi, I was working on a semi-transparent movable div overtop an image and &quot;filter:alpha(opacity=80);&quot; made it IE compatible but when I moved it, it would hide under the  that was behind it in some areas. Adding &quot;width:100%;height:100%;&quot; worked but &quot;zoom:1;&quot; didn&#039;t. Hope this helps someone.</description>
		<content:encoded><![CDATA[<p>Just fyi, I was working on a semi-transparent movable div overtop an image and &#8220;filter:alpha(opacity=80);&#8221; made it IE compatible but when I moved it, it would hide under the  that was behind it in some areas. Adding &#8220;width:100%;height:100%;&#8221; worked but &#8220;zoom:1;&#8221; didn&#8217;t. Hope this helps someone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeepers</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-872074</link>
		<dc:creator>Jeepers</dc:creator>
		<pubDate>Fri, 01 May 2009 04:13:07 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-872074</guid>
		<description>As far as I can see, nobody has mentioned M$&#039;s alpha filter breaking if the page is longer than 2048px in IE7 (possibly other IE versions as well). Many have commented that this is due to Vista, XP, graphic cards, drivers etc etc, all not true! M$ sucks at programming and gets most things wrong basically charging for customers to be beta testers for their next product .

There is no way around the breaking alpha filter except to progmatically limit the size of the element that the filter is to be used on to 2048px high (or for everyone to use Firefox who implement opacity in CSS).

Writing this I have suddenly realised how much I wish M$ IE would just go away as most standards compliant code has to be hacked to work the same in IE!</description>
		<content:encoded><![CDATA[<p>As far as I can see, nobody has mentioned M$&#8217;s alpha filter breaking if the page is longer than 2048px in IE7 (possibly other IE versions as well). Many have commented that this is due to Vista, XP, graphic cards, drivers etc etc, all not true! M$ sucks at programming and gets most things wrong basically charging for customers to be beta testers for their next product .</p>
<p>There is no way around the breaking alpha filter except to progmatically limit the size of the element that the filter is to be used on to 2048px high (or for everyone to use Firefox who implement opacity in CSS).</p>
<p>Writing this I have suddenly realised how much I wish M$ IE would just go away as most standards compliant code has to be hacked to work the same in IE!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haravikk</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-829423</link>
		<dc:creator>Haravikk</dc:creator>
		<pubDate>Sat, 04 Apr 2009 11:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-829423</guid>
		<description>I&#039;d just like to note here; in Safari, FireFox, etc. the opacity attribute multiplies the opacity of the element and its contents, whereas in Internet Explorer the filter attribute /sets/ the opacity value of the element.

So if the element you apply the filter to has transparent child-elements, then their transparency will be set to the new value. This is especially nasty if you have for-example a .png with partially transparent edges, as all pixels with opacity greater than 0.0 are set to whatever the new-value is, resulting in jagged-edges.

For example:
pixel&#039;s opacity, opacity: 0.5, filter: alpha(opacity = 50)
75%, 37.5%, 50%
50%, 25%, 50%
25%, 12.5%, 50%</description>
		<content:encoded><![CDATA[<p>I&#8217;d just like to note here; in Safari, FireFox, etc. the opacity attribute multiplies the opacity of the element and its contents, whereas in Internet Explorer the filter attribute /sets/ the opacity value of the element.</p>
<p>So if the element you apply the filter to has transparent child-elements, then their transparency will be set to the new value. This is especially nasty if you have for-example a .png with partially transparent edges, as all pixels with opacity greater than 0.0 are set to whatever the new-value is, resulting in jagged-edges.</p>
<p>For example:<br />
pixel&#8217;s opacity, opacity: 0.5, filter: alpha(opacity = 50)<br />
75%, 37.5%, 50%<br />
50%, 25%, 50%<br />
25%, 12.5%, 50%</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ViRuSTriNiTy</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-752101</link>
		<dc:creator>ViRuSTriNiTy</dc:creator>
		<pubDate>Mon, 16 Feb 2009 20:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-752101</guid>
		<description>@Tom

Thanks for your reply. I throught i solved it with my method but i have white pixels again now T_T and reencoding of the picture in any way is not working because those pixels are there whatever i try to do (they are some times here and sometimes there, the location changes but it wont go away). the gif format is the only format where ie does not show the white pixel bug but i cannot save my pics as gif due to color los and therefore ugly gradients.</description>
		<content:encoded><![CDATA[<p>@Tom</p>
<p>Thanks for your reply. I throught i solved it with my method but i have white pixels again now T_T and reencoding of the picture in any way is not working because those pixels are there whatever i try to do (they are some times here and sometimes there, the location changes but it wont go away). the gif format is the only format where ie does not show the white pixel bug but i cannot save my pics as gif due to color los and therefore ugly gradients.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-752039</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 16 Feb 2009 18:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-752039</guid>
		<description>Whooops, my last statement was referring to how I *want* things to be, not how they are...

So, I&#039;d like to be able to have a parent with &quot;opacity: 0.5&quot; and a child with &quot;opacity: 2&quot;, and have the child finally rendered with 100% opacity.  This would be consistent with the fact that, AFAIK, if I specified &quot;opacity: 0.5&quot; for both of them, the child would end up with 25% opacity.

If I nested the child with &quot;opacity: 2&quot; inside something with &gt;50% opacity, I would expect it to have 100% opacity as a result: no more, no less.</description>
		<content:encoded><![CDATA[<p>Whooops, my last statement was referring to how I *want* things to be, not how they are&#8230;</p>
<p>So, I&#8217;d like to be able to have a parent with &#8220;opacity: 0.5&#8243; and a child with &#8220;opacity: 2&#8243;, and have the child finally rendered with 100% opacity.  This would be consistent with the fact that, AFAIK, if I specified &#8220;opacity: 0.5&#8243; for both of them, the child would end up with 25% opacity.</p>
<p>If I nested the child with &#8220;opacity: 2&#8243; inside something with &gt;50% opacity, I would expect it to have 100% opacity as a result: no more, no less.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-752005</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 16 Feb 2009 16:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-752005</guid>
		<description>@Tom: Sorry, but I stand by what I said, although perhaps I could&#039;ve been clearer:

&quot;The way I see it, if a value &gt; 100% is computed as the total opacity of an element, then surely the value used to compute its colour should be clipped at 100, while the value *inherited by its children* should remain &gt; 100.&quot;

So, the final computed opacity of an element would be limited 0-100%, but it would still be possible to define a relationship whereby a child was more opaque than its parent.

I just confirmed for myself that making a diffuse material colour &gt; 1 in a colour channel in fixed function OpenGL lighting causes &#039;more than 100% reflection&#039;.  This is calculations in a computer, not physics; conservation of energy need not apply if we don&#039;t wish it to :).

To quote the OpenGL &quot;Red Book&quot;:
&quot;For the versions of glColor*() that accept floating-point data types, the values should *typically* range between 0.0 and 1.0, the minimum and maximum values that can be stored in the framebuffer......

&quot;Neither floating-point nor signed-integer values are clamped to the range [0,1] before updating the current color or current lighting material parameters. After lighting calculations, resulting color values outside the range [0,1] are clamped to the range [0,1] before they are interpolated or written into a color buffer. Even if lighting is disabled, the color components are clamped before rasterization.&quot;
http://www.glprogramming.com/red/chapter04.html

To take a non-hypothetical CSS example: I have a menu which I want to overlay on a header, with opacity.  This works and I&#039;m happy with how it looks.  I then want to add drop-down menus, but I find that if they have low opacity, they become illegible as they blend with the page content.  So I wish to apply &gt;1 opacity so that the drop-downs are more opaque than their parents.  Tough, I can&#039;t.  Oh well; I&#039;ll have to make another plan.

So, internal values used for calculation can be out of bounds, but the final value used in output is clipped: Let me know if it&#039;s still not clear, or if you think I&#039;m mistaken.</description>
		<content:encoded><![CDATA[<p>@Tom: Sorry, but I stand by what I said, although perhaps I could&#8217;ve been clearer:</p>
<p>&#8220;The way I see it, if a value &gt; 100% is computed as the total opacity of an element, then surely the value used to compute its colour should be clipped at 100, while the value *inherited by its children* should remain &gt; 100.&#8221;</p>
<p>So, the final computed opacity of an element would be limited 0-100%, but it would still be possible to define a relationship whereby a child was more opaque than its parent.</p>
<p>I just confirmed for myself that making a diffuse material colour &gt; 1 in a colour channel in fixed function OpenGL lighting causes &#8216;more than 100% reflection&#8217;.  This is calculations in a computer, not physics; conservation of energy need not apply if we don&#8217;t wish it to :).</p>
<p>To quote the OpenGL &#8220;Red Book&#8221;:<br />
&#8220;For the versions of glColor*() that accept floating-point data types, the values should *typically* range between 0.0 and 1.0, the minimum and maximum values that can be stored in the framebuffer&#8230;&#8230;</p>
<p>&#8220;Neither floating-point nor signed-integer values are clamped to the range [0,1] before updating the current color or current lighting material parameters. After lighting calculations, resulting color values outside the range [0,1] are clamped to the range [0,1] before they are interpolated or written into a color buffer. Even if lighting is disabled, the color components are clamped before rasterization.&#8221;<br />
<a href="http://www.glprogramming.com/red/chapter04.html" rel="nofollow">http://www.glprogramming.com/red/chapter04.html</a></p>
<p>To take a non-hypothetical CSS example: I have a menu which I want to overlay on a header, with opacity.  This works and I&#8217;m happy with how it looks.  I then want to add drop-down menus, but I find that if they have low opacity, they become illegible as they blend with the page content.  So I wish to apply &gt;1 opacity so that the drop-downs are more opaque than their parents.  Tough, I can&#8217;t.  Oh well; I&#8217;ll have to make another plan.</p>
<p>So, internal values used for calculation can be out of bounds, but the final value used in output is clipped: Let me know if it&#8217;s still not clear, or if you think I&#8217;m mistaken.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-748958</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 11 Feb 2009 08:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-748958</guid>
		<description>@ViRuSTriNiTy: That is an issue with some versions of Internet Explorer. Your example worked fine on a few computers but it showed the white pixels on others. It&#039;s a &quot;classic&quot; issue with IE and there&#039;s not much you can do about it. You could try to re-encode your image, give it a different compression value to get it to encode differently or use a different format.
I have seen this bug show up on various IE versions and file formats, so just converting from jpeg to png might not help... There&#039;s no fix for this Microsoft bug (like there&#039;s no fix for many, many others) and all you can try is a work-around by re-encoding.</description>
		<content:encoded><![CDATA[<p>@ViRuSTriNiTy: That is an issue with some versions of Internet Explorer. Your example worked fine on a few computers but it showed the white pixels on others. It&#8217;s a &#8220;classic&#8221; issue with IE and there&#8217;s not much you can do about it. You could try to re-encode your image, give it a different compression value to get it to encode differently or use a different format.<br />
I have seen this bug show up on various IE versions and file formats, so just converting from jpeg to png might not help&#8230; There&#8217;s no fix for this Microsoft bug (like there&#8217;s no fix for many, many others) and all you can try is a work-around by re-encoding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-748917</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 11 Feb 2009 07:06:25 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-748917</guid>
		<description></description>
		<content:encoded><![CDATA[<p>&#8220;It is not at all clear to me why “You can NOT have opacity &gt; 100% because that simply doesn’t make sense.”&#8221;<br />
Think in physics:<br />
Transparency 100% = opacity 0% = all the light goes through the object;<br />
Transparency 0% = opacity 100% = all the light is reflected by the object;<br />
So, if you try to have opacity  100%, the object should reflect more light than it&#8217;s actually receiving, which is nonsense because there is no other light reaching it except for the one &#8230; reaching it. At opacity = 100%, the object reflects all the light and lets you see it in the clearest way possible.</p>
<p>Think logic:<br />
If the object is completely transparent (opacity = 0%) and you can see everything through it as if it wasn&#8217;t there, how much clearer could you see through it?<br />
If the object is completely opaque (opacity = 100%), how much more opaque could it be?</p>
<p>Think programatic:<br />
As a web browser, if you have to draw a pixel with opacity = 0%, you don&#8217;t display it at all, because it&#8217;s completely transparent and you want the user to see whatever was there first (behind it).<br />
If you have to draw a pixel with opacity = 50%, you would make an average of the RGB defining that pixel and the one that was previously there (or usually the white background of the page, if there wasn&#8217;t anything) and plot the result.<br />
If you have to draw a pixel with opacity = 100%, you just do it, overwriting whatever was before it.</p>
<p>Blending is done mathematically, something along the lines of:<br />
actualR = newR * opacity + oldR * (1 &#8211; opacity)<br />
actualG = newG * opacity + oldG * (1 &#8211; opacity)<br />
actualB = newB * opacity + oldB * (1 &#8211; opacity)<br />
So you have the old pixel that was at that position defined by (oldR, oldG, oldB), the new pixel (newR, newG, newB) and what you&#8217;re actually going to draw on the screen: (actualR, actualG, actualB).<br />
Because of the way the computer screen is designed, every R/G/B pixel has to receive a value, usually between 0 and 255, where 0 = darkest, don&#8217;t light at all and 255 = lightest, light at full power. Now, consider that you have a black pixel defined by (0, 0, 0) at a given position and over it you have to draw a white pixel defined by (255, 255, 255) which has opacity 1.5 (that&#8217;s 150%). Here&#8217;s what you get:<br />
actualR = actualG = actualB = 255 * 1.5 = 382.5<br />
How can you tell that pixel to light up at 382.5 when the brightest it can achieve is 255?</p>
<p>In conclusion, opacity = 0% and opacity = 100% are physical limitations which also have effect in various other ways &#8211; logic, programatic and electronic. Any value outside the [0..1] bounds is an error, a fallacy, an illogical result of some bad computations. You are right, DirectX and OpenGL may easily implement their own error-fixing or error-ignoring (not sure about it, but it would be stupid to have something crash because of a tiny overflow of 0.0001) but the fact that you could send your video card a value of 1.5 for opacity doesn&#8217;t mean that it makes sense and you always have to think inside those bounds.</p>
<p>Let me know if it&#8217;s still not clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-745944</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 06 Feb 2009 12:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-745944</guid>
		<description></description>
		<content:encoded><![CDATA[<p>It is not at all clear to me why &#8220;You can NOT have opacity &gt; 100% because that simply doesn’t make sense.&#8221;</p>
<p>As Tom has explained, opacity is a scaling factor on alpha.  Why this should only be an attenuation and never an amplification is a complete mystery to me.  The way I see it, if a value &gt; 100% is computed as the total opacity of an element, then surely the value used to compute its colour should be clipped at 100, while the value inherited by its children should remain &gt; 100.</p>
<p>I&#8217;m pretty sure that in OpenGL / DirectX etc, you are able to define values &gt; 1 for a colour channel.  If the result of all the lighting / blending / whatever calculations for a given pixel are &gt; 1, then 1 is what gets rasterized.</p>
<p>Oh, how I hate web design&#8230; its enough to drive a man to flash ;-) (no idea how that handles similar things, but I bet it&#8217;s less idiotic).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ViRuSTriNiTy</title>
		<link>http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/comment-page-2/#comment-743374</link>
		<dc:creator>ViRuSTriNiTy</dc:creator>
		<pubDate>Mon, 02 Feb 2009 09:18:02 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/#comment-743374</guid>
		<description>Hi there,

i have a similar problem with css opacity in IE. Please have a look at the following site:

http://www.lcdhype.de.vu/stuff/iebug

As you can see, IE displays the picture with random white pixels. Those pixels are not stored in the picture and those pixels are displayed as soon as you add the css filter attribute to the img tag. This is a massive bug and i reported it to m$ already but got no response yet.

All your solutions with zoom, z-index and width won&#039;t work here. My solution: add style=&quot;width:%px&quot; to the img tag where % is the actuall width of the img + 1. You may add a surrounding layer with the actual with of the picture and overflow:hidden when the additional pixel bugs you.

I hope this will help because i have spent so much time figuring this out.</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>i have a similar problem with css opacity in IE. Please have a look at the following site:</p>
<p><a href="http://www.lcdhype.de.vu/stuff/iebug" rel="nofollow">http://www.lcdhype.de.vu/stuff/iebug</a></p>
<p>As you can see, IE displays the picture with random white pixels. Those pixels are not stored in the picture and those pixels are displayed as soon as you add the css filter attribute to the img tag. This is a massive bug and i reported it to m$ already but got no response yet.</p>
<p>All your solutions with zoom, z-index and width won&#8217;t work here. My solution: add style=&#8221;width:%px&#8221; to the img tag where % is the actuall width of the img + 1. You may add a surrounding layer with the actual with of the picture and overflow:hidden when the additional pixel bugs you.</p>
<p>I hope this will help because i have spent so much time figuring this out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
