0

I don't believe I can use :parent or sibling, pseudo classes with this as they are neither. They are elements completely separate from one another. I'm wondering if it's possible to do this without any JS. Pure CSS only. Below is my markup.

    <ul id="onsix"><!-- first instance -->
        <li id="one" class="shov one"><a class="one" href="#">Lorem Ipsum.</a></li><br>
        <li id="two" class="shov two"><a class="one" href="#">Lorem Ipsum.</a></li><br>
        <li id="three" class="shov three"><a class="one" href="#">Lorem Ipsum.</a></li><br>
    </ul>

   <div class="twosix"><!-- second instance -->
        <div id="one2" class="over shov one"></div>
        <div id="two2" class="over shov two"></div>
        <div id="three2" class="over shov three"></div>
    </div>

Basically I would like to add a hover effect to both instances with the class="one" when either instance of class one is hovered. Thus far I have tried sibling psuedo class with no success.

So, essentially these two elements.

        <li id="one" class="shov one"><a class="one" href="#">Lorem Ipsum.</a></li><br>

and

        <div id="one2" class="over shov one"></div>
Dr Upvote
  • 8,023
  • 24
  • 91
  • 204
– Stephen P Aug 22 '16 at 18:49
  • @ScientiaEtVeritas Updated. – Dr Upvote Aug 22 '16 at 19:04
  • It is, essentially a dupe of the "parent selector" question. This is not possible with CSS as CSS cannot affect element UP the DOM. Javascript would be required. – Paulie_D Aug 22 '16 at 20:04
  • Thanks you @Paulie_D , for you candor. – Dr Upvote Aug 22 '16 at 20:16