1

There was apparently a :contains selector proposed at some point, but was dropped. I've searched all over, but I can't seem to find anything which gives any more info than this.

Why was this selector not included in the css3 spec?

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
gandalf3
  • 113
  • 4

1 Answers1

2

It was not included in CSS3 for a few reasons. A little more about reasons can be found at https://stackoverflow.com/questions/4781141/why-doesnt-the-selector-h3nth-child1containsa-work/4781167#4781167

The best alternative to use is CSS3 Substring Matching Attribute Selectors which allow wild cards

Anagio
  • 11,195
  • 1
  • 26
  • 49