1

Say I have something like this:

<div class="entry">
   <a class="click" href="http://domain.com">Some link</a>
</div>

<div class="entry">
   <a class="unclick" href="http://domain.com">Some link</a>
</div>

How would I target the entire contents of a .entry surrounding an a.click, without affecting the .entry surrounding of an a.unclick

I want to hide the outer div if the link has a class of "click".

EDIT: I need to do this without resorting to javascript, only CSS and HTML.

Jason Mayoff
  • 77
  • 3
  • 11
  • 2
    with CSS alone? jQuery yes. CSS perhaps not. – Popnoodles Dec 08 '12 at 22:16
  • 2
    You can't ([yet](https://developer.mozilla.org/en-US/docs/DOM/event.relatedTarget)) CSS to style a parent based on its descendents. – David Thomas Dec 08 '12 at 22:17
  • 1
    possible duplicate of [Apply CSS styles to an element depending on its child elements](http://stackoverflow.com/questions/2326499/apply-css-styles-to-an-element-depending-on-its-child-elements) – aquinas Dec 08 '12 at 22:20

0 Answers0