On May 25, 2010, at 5:26 AM, Christopher Schmitt wrote:

>>  div {background-color: rgba(255,255,255,0.5);
>> 
>> That won't work in IE/Win, I believe, but it will in pretty much 
>> anything else of recent vintage.  Alternatively, you could create a 
>> smallish PNG which is all white and has 50% opacity and drop it into 
>> the background of the div.  That will work in all current browsers 
>> including IE/Win.
> 
> Also, you can use IE filter for gradients, which allow for opacity:
> 
> div { 
> filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#66FFFF00, 
> endColorstr=#66FFFF00 ); }
> 
> #66FF00 would be the hexadecimal color. Then the last hexadecimal value would 
> be the opacity of the color.

With the caveat(s) that:
1. the element must have 'hasLayout' [1] set to true for those filters to work 
correctly most of the time
2. those filters affect the display of text / font smoothing, and not exactly 
as an improvement, esp on Win XP.
3. those filters may affect how other -descendent- element act, see [2] for 
example

(I prefer the semi transparent png file my self, and opaque backgrounds for old 
browsers such as IE 6).

[1] http://www.satzansatz.de/cssd/onhavinglayout.html
[2] http://www.satzansatz.de/cssd/tmp/alphatransparency.html

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





______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
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