0

I know this could be done with jQuery relatively easy but I'm looking for a CSS solution if anybody can help me.

I've fiddled what I have here:

Essentially what I want to do is when a span is hovered, it changes the parent div's background. #testBanner

This is what I've tried - And it obviously doesn't look right, at least from my point of view it doesn't. But I can't think of any other way to do it.

#testBanner .hover-1:hover #testBanner {background: #EEFFEE;}

Any help would be great!

Thanks!

Community
  • 1
  • 1
Nick
  • 1,853
  • 3
  • 25
  • 50
  • 1
    Unfortunately there is no "parent selector". At least not yet. There is a relatively decent hack to work around it using "the checkbox hack". http://stackoverflow.com/questions/24393931/faking-the-parent-selector-using-pure-css – Michael Aug 14 '14 at 12:37
  • You can[TRY THIS](http://stackoverflow.com/questions/22270078/css-hover-on-a-div-but-not-if-hover-on-his-children) else [THIS](http://stackoverflow.com/questions/24393931/faking-the-parent-selector-using-pure-css) – Benjamin Aug 14 '14 at 12:37

0 Answers0