It's a "simple" selector without a combinator I've found a given example in conjuction with using multiple class selectors [w3.org]
yea, it's valid, but I'll be blowed if I can remember what it's called, if indeed it has a name :o
It's a "simple" selector without a combinator
I've found a given example in conjuction with using multiple class selectors [w3.org]
IMHO, it all hinges on the word combinators, with CSS there are various ways to combine selectors and these are described in the Selector Syntax [w3.org] part of the spec.. however as usual when forced to read and interpret a recommendation it's nae easy ;)
So my reading of that is that a selector can be a chain, separated by one of 3 different combinators; the example given by moltar and the CSS2.1 multiple class example does not need or use a combinator, there is no whitespace, or indeed anything else (in fact if there were whitespace between the simple selectors it would alter the target) - so to my interpretation this is a really really simple selector which simply says the selector has to match all.
I do have some vague recollection of reading something previously about IE and this type of selector, where it only matched the last selector in a chain, but I've ran some tests and all seems OK so perhaps (even if a problem did exist briefly) it was fixed between IE7beta and release, and back testing seems to back up moltars claim, in that it always was OK!
anyway no matter, moltar the code you gave is working fine for me, as in I am not seeing the default color and I am seeing the green or red border depending on which class I put in the HTML, what's the doctype and context and sorry for being cheeky but is the speeling and case correct?
[edited by: SuzyUK at 6:03 pm (utc) on Feb. 3, 2008]