0

I want a div with the title "gradiant" to reduce its opacity when an adjacent div with class "adjust_imagemode" has a hover state. My HTML looks like this:

<div class="slides_gradiant_bottom_heavy" title="gradiant"></div>
<div class="adjust_imagemode"> - </div>

My CSS looks like this:

.adjust_imagemode:hover + [title="gradiant"] {
    opacity: .01;
}

I tried with and without quotation marks around the title. No luck. Any idea what I'm doing wrong?

j08691
  • 204,283
  • 31
  • 260
  • 272
dsiglin
  • 59
  • 1
  • 7
  • 1
    Sibling selectors select siblings that are present **after** the reference element in the DOM and **not before**. You need to change the order of elements if you want to use CSS selectors. – Harry Feb 10 '16 at 16:25
  • 1
    There's no previous sibling selector in CSS – j08691 Feb 10 '16 at 16:25
  • 1
    Well that was easy. Thanks, and that fixed it! – dsiglin Feb 10 '16 at 16:32

0 Answers0