On Feb 5, 2009, at 10:33 AM, David Hucklesby wrote:

> On Wed, 4 Feb 2009 14:15:08 -0800, Kenoli Oleari wrote:
>> What file format can I use to get IE5 and IE6 to display  
>> transparency and a gradient?
>> I have an image with a gradient that goes from transparent to  
>> black.  As a png image it
>> works fine everywhere except these versions of IE.  A gif image  
>> screws up the gradient
>> and IE turns the transparency in png, jpg and tif images to white  
>> or off white. How do
>> I get these browsers to display both a gradient and transparency?
>>
>
> Some alternatives (all browsers) -
>
> <http://www.hedgerwow.com/360/dhtml/rgba/demo.php>

There is no need to use js to detect if a browser support rgba() or  
not. Just use the cascade.
selector {
         
filter:progid:DXImageTransform 
.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000); / 
*AARRGGBB*/ /*ie5.5~7*/
        background: transparent url(data:image/png;base64,iVBxxxxxx+); /*  
fx2, IE8, Opera9;*/
        background: rgba(200,200,200,.5); /* gecko 1.9-fx3+,  
Safari2+,Opera10+ */
}

Note that using that filter can result in poor text-rendering on IE 6&  
7 with ClearType enabled.

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to