treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Triggering CSS transition by hovering over a different element

  • www.aaronheine.com

    Hover over the tip of light saber. I would like to trigger that action when hovering over the entire photo of Luke and Leah. Not just the little sword tip.

    Is it possible to trigger one div when you are hovering over a different div using CSS?

    Thanks again!
  • google doesn't trust that site.


    I think what you want to do is


    a:hover+a {
    color:red;
    }


    with this, the first a after the one hovered would change to red.

    You could put a div:hover+div and make the second div position:absolute. The only important thing is that the element you want to change must immediately follow the element that is hovered.
  • Thanks! That worked.