...

View Full Version : CSS and opacity



FlashDancer
01-21-2012, 12:27 PM
I am using this for my background:

background: rgba(127,127,127,0.25)

This isn't valid CSS and I am wanting to use:

background: rgb(127,127,127);
opacity: 0.25

The problem with using the second one is that the opacity also effecting everything inside the DIV container.

Does anyone have a solution for just getting the background at 25% opacity, whilst being CSS compliant (no transparent image as background please :P)?

Arbitrator
01-21-2012, 01:35 PM
Does anyone have a solution for just getting the background at 25% opacity, whilst being CSS compliant (no transparent image as background please :P)?Change the validation profile (under "More Options") to CSS3 if using the W3C's validator. The default profile is CSS2.1.

Your RGBA code is valid CSS and defined in CSS3 Color.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum