0

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>
BoltClock
  • 630,065
  • 150
  • 1,295
  • 1,284
Ricardo Altamirano
  • 12,617
  • 20
  • 67
  • 104
  • 2
    Found it: http://www.xmlmind.com/xmleditor//_distrib/doc/csssupport/containing_child.html It appears to be an XMLmind extension... – Šime Vidas Aug 13 '11 at 01:09

1 Answers1

7

:contains-element isn'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

This document describes the subset of CSS2 supported by XXE, as well as advanced "proprietary extensions" needed to style complex XML documents.

http://www.xmlmind.com/xmleditor//_distrib/doc/csssupport/index.html

Community
  • 1
  • 1
thirtydot
  • 210,355
  • 44
  • 377
  • 337