Mandarin Logo
MainBlogFAQsBox TipsText TricksColor ChartFree GalleryCSS Opacity
TWO CENTS CURRENT ISSUE 2006 WEST SACRAMENTO CALIFORNIA
Text Tricks Index of Recent Text Tricks
"For People Who Make Mistakes" ...

CSS Transparency: The Opacity Property
Brown on Darksalmon

CSS Opacity Example
color:brown with background:white

...if our page is darksalmon then the pullquote area that is darksalmon will be blended with20% white...

What color do we use for a background? For the pullquote area we are using background:white.

Why white? The pullquote area that is darksalmon will be blended with 20% white. We start with an an opacity of 20%. The filter:alpha(opacity=20) is the syntax for Internet Explorer while -moz-opacity:0.2 is the syntax for Mozilla. Anything we put in the div is set to transparent. The result is that the white background will blend with the display of the child element. That means that if our page background is darksalmon then the pullquote area that is darksalmon will be blended with 20% white. The full effect looks like this.

Brown Text with White Background
It is necessary to set the background to a color for Internet Explorer (IE). We are using the color named white. The desired opacity effect is achieved in Mozilla and IE.

Copy and paste this in your Blog or Web page.

That's the code in its entirity. It will look like this.

Color:Brown with Background:White

...if our page is darksalmon then the pullquote area that is darksalmon will be blended with20% white...

Here we are starting out with an opacity of 20%.

The filter:alpha(opacity=20) is the syntax for Internet Explorer while -moz-opacity:0.2 is the syntax for Mozilla. Anything we put in the div is set to transparent so the white background will white background will blend with the display of the child element. That means that if our page background is darksalmon then the pullquote area that is darksalmon will be blended with 20% white. The full effect looks like this.

Brown Text with White Background
The result is best in Internet Explorer when a background color is defined. The desired opacity effect is achieved in Mozilla and IE.

CSS Tranparency: The Opacity Property Brown on Darksalmon
#  Last Updated:  Tuesday, November 09, 2004
You are viewing one post
VIEW ALL    BACK TO TOP

Comments: Post a Comment
Mandarin Archives 2005: J F M A M J J A S O N D   2004: J F M A M J J A S O N D   2003: J F M A M J J A S O N D  
This work is licensed under a Creative Commons License