css validation

S

steve

How do I fix this css so they will validate correctly?

..some .name {filter: alpha(opacity=65); moz-opacity: .65;}



-- -- -- -- -- -- -- -- --
Recommended hosting
www.saHOSTplus.com
 
S

SpaceGirl

steve said:
How do I fix this css so they will validate correctly?

.some .name {filter: alpha(opacity=65); moz-opacity: .65;}



-- -- -- -- -- -- -- -- --
Recommended hosting
www.saHOSTplus.com


Aren't filters IE specific, therefore non-standard...? Might be wrong.
 
D

David Dorward

steve said:
How do I fix this css so they will validate correctly?

.some .name {filter: alpha(opacity=65); moz-opacity: .65;}

Filter is an unofficial extension
moz-opacity is also an unofficial extension (Is there opacity in CSS 3? If
so then it can be considered semi-official but still not valid).

To make it validate, remove the non-standard code.

This leaves you with:

..some .name { }
 
T

Toby A Inkster

steve said:
How do I fix this css so they will validate correctly?
.some .name {filter: alpha(opacity=65); moz-opacity: .65;}

As per David's message these are both browser-specific CSS extensions so
will never validate.

You could use:

.some .name {
opacity: .65;
}

but that will only work in Mozilla 1.6+. It's still not valid CSS 2.x, but
should be valid CSS 3.0 when it arrives.

However, if you want something that actually *works*, even though it's not
technically valid:

.some .name {
opacity: .65;
filter: alpha(opacity=65);
-moz-opacity: .65;
-khtml-opacity: .65;
/* opera doesn't support this yet, but if/when it does, it
* will probably take a syntax like... */
-o-opacity: .65;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top