0

I want to change the button class styles only when the input is getting the validation class:

<div class="wrapper">
    <div class=input-box>
        <input class="input-validation-error">
    </div>
    <button class="filterbarcode" />
</div>
Robin
  • 8,162
  • 7
  • 56
  • 101
alonblack
  • 925
  • 2
  • 13
  • 31
  • 1
    No, you can't do that with just CSS because CSS selectors can select only elements that are child/descendant/sibling of the reference element. Here, the `input` is neither of those with respect to the `button`. – Harry Nov 04 '15 at 09:08
  • Yes "Harry" is right you can not do that only with css. – Allen Nov 04 '15 at 09:11
  • @akash: I think you hadn't read my comment fully. I had already stated that we can select siblings but here the `input` is **not a sibling** of the button. – Harry Nov 04 '15 at 09:16

0 Answers0