0

Possible Duplicate:
Is there a CSS parent selector?

Say you have:

----------
    X
----------
    Y -> Z
----------

Given Z is children of Y, i want to select all X which have a sibling that has a child Z

Community
  • 1
  • 1
pedrozath
  • 2,155
  • 4
  • 19
  • 23

2 Answers2

2

You cannot select a parent element in CSS based upon the child and sibling elements...so there's no way you can get this done...

So there's no CSS parent selector yet..

CSS 2 Selector's Specification Reference

CSS 3 Selector's Specification Reference

In CSS4 Specification I remember there was something like $ kind of thing but it was rejected later

Mr. Alien
  • 140,764
  • 31
  • 277
  • 265
1

There is currently no way to select the parent of an element in CSS That is why it is impossible to select sibling that has a child Z.

Anton
  • 8,537
  • 10
  • 36
  • 64