Treehouse: Grow your CSS skills. Land your dream job.

Triggering CSS transition by hovering over a different element

  • # February 15, 2012 at 1:36 pm

    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!

    # February 15, 2012 at 2:09 pm

    google doesn’t trust that site.

    I think what you want to do is

    a:hover+a {

    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.

    # February 15, 2012 at 2:58 pm

    Thanks! That worked.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.