Netbeans, my IDE, marks this CSS as incorrect, but I can’t tell the problem. I can’t find anything that says contains-element is specific to CSS3, but the styling doesn’t show up in Firefox or Opera.
CSS:
span:contains-element(input[type="radio"]) {
border:1px solid black;
}
HTML:
<span><input type="radio" name="amount" value="Cash amount"/>Cash amount</span>
:contains-elementisn’t a CSS selector, as far as I know. Where did you get it from?The fact that it doesn’t exist explains why it doesn’t work in browsers and Netbeans marks it as incorrect.
That looks like an attempted “parent selector” (maybe from some JavaScript library?) and as always, there is no parent selector in CSS:
As pointed out by @Šime Vidas, that selector is specific to this product:
http://www.xmlmind.com/xmleditor//_distrib/doc/csssupport/containing_child.html
http://www.xmlmind.com/xmleditor//_distrib/doc/csssupport/index.html