Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Tried to setup an image background like that:
C#
body {
    background-image:url('../../images/background.png');
    background-repeat:no-repeat;
    background-attachment:fixed;
    opacity: .1;
}

But got a warning on opacity: A unknown CSS (V2.1) property.
How to solve this problem? Thanks.
Posted
Updated 8-Nov-13 3:17am
v2

1 solution

Refer - CSS 2.1 errors: not a known property name[^].
Quote:

Validation errors are all fine, because they are using the proper CSS 2.1 Documentation and your trying to validate CSS3 properties in a CSS 2.1 context.


What you probably want is to build your application by-passing the CSS Errors, no matter what they are, for that you can transform this "errors" into warnings using Visual Studio Options:


in The Visual Studio menu click on:


Tools > Options... and drill down Text Editor > CSS > Miscellaneous


and just make the CSS Errors to be treated as warnings


ScreenShot: http://i.stack.imgur.com/Qhe6J.png[^]


 
Share this answer
 
v5
Comments
[no name] 8-Nov-13 9:49am    
Tadit: I also read this article you recommended. It is a warning. I also downloaded ccs.xml, but I could not find
Okay. But what you downloaded and what that for?
bbirajdar 8-Nov-13 10:14am    
opacity is not supported by all browsers. check the browser documentation
Yeah may be. But this warning comes every time we try to add any CSS 3 property.

Anyway, I don't understand the answer added by OP. Do you understand how he resolved?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900