aspnetguy Posted February 6, 2007 Share Posted February 6, 2007 can someone explain what this error means...since when does opacity not exist????http://jigsaw.w3.org/css-validator/validat...;usermedium=all Link to comment Share on other sites More sharing options...
jlhaslip Posted February 6, 2007 Share Posted February 6, 2007 <span style="float:left;filter:alpha(opacity=25);-moz-opacity:.25;opacity:.25;"><img src="http://www.mandarindesign.com/images/v90.gif" width="50" height="50"></span> #lightbox { display:none; background: #000000; opacity: .5; filter: alpha(opacity=50); position: absolute; top: 0; left: 0; } Here is a sample of some css opacity code which does work. Followed by your opacity code.Is it possible that the entire ID'd element does not accept the opacity attribute? Maybe post your (x)html code to see if you are trying to add opacity to an element which may not be acceptable to the opacity attribute? For example, you can add opacity to pictures, but perhaps not paragraphs??? Only thing I can think of...*EDIT*A check of the index of the w3c css 2 specs finds zero results for "opacity", "filter", or "alpha", so where are they hiding the information on Opacity?*EDIT 2 *Further research shows that the "opacity" property is not officially included in the CSS Specs until CSS3 under the guise of the SVG implementation, so the validation of the CSS must be using guidelines from prior to the SVG standards.Check the link below. That doesn't mean the Browsers do not implement the property, but the CSS Validator would be programmed to not allow it before the CSS3 standards??? I don't know any more than this. Maybe someone else has another take on it...http://www.w3.org/TR/css3-color/#profiles Link to comment Share on other sites More sharing options...
aspnetguy Posted February 7, 2007 Author Share Posted February 7, 2007 thanks for doing all that research. It does indeed work just doesn't validate. Oh well, not valid CSS for me Link to comment Share on other sites More sharing options...
pulpfiction Posted February 7, 2007 Share Posted February 7, 2007 There is some discussion related to this... as it suggests, you can use JS to apply the opacity and your CSS will be valid too.http://www.sitepoint.com/forums/showthread.php?t=454906 Link to comment Share on other sites More sharing options...
Jonas Posted February 11, 2007 Share Posted February 11, 2007 I notice if you check/validate for css 3 spesification, then it's only the filter thing that's not valid:http://jigsaw.w3.org/css-validator/validat...=1&profile=css3Is filter: alpha(opacity=100); still necessary to use for IE? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now