When I try to validate my site's CSS, a CSS file that works in conjunction with some JavaScript files I use to randomly rotate and fade my top banner images in and out throws this error message: Property opacity doesn't exist in CSS level 2.1 but exists in : 1 1 The validator throws twelve such error messages for twelve different lines of the CSS file, three of which are these: .slideshow-images-visible { opacity: 1;} .slideshow-images-prev { opacity: 0; } .slideshow-images-next { opacity: 0; } In case it matters, I'm using the strict docType declaration at the top of my header: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> I'd like to continue using these files, and I also would like my CSS to validate. Can you tell me if there is a fix or work-around I can use?
Opacity is a CSS3 property but the validator is not set up for that just yet. You could do one CSS file for CSS3 only and <link> to it. So your normal CSS could be valid.
Did you try validating through http://jigsaw.w3.org/css-validator/#validate_by_uri+with_options? one can choose from version from profile under more option.
Seeing as you are only using opacity:1; and opacity:0; you could probably get away with using display:none; or visibility:hidden, although this might require a bit of additional tweaking if it causes other problems. Although as suggested I wouldn't worry about it.