Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Hover over 1 div to change another div

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #264152
    cautionduster
    Participant

    Hi Everyone,

    I have a very specific problem. I have a link inside my headline. When you hover over the link, the headline text color would change. I provided my code.

    http://jsfiddle.net/eo1gazwn/130/

    I can’t get it to work. Can someone please help?

    Thank you

    #264153
    JeroenR
    Participant

    As you are toggling the class active, you can apply the color with that class: .active { color: red; }.
    The other line of CSS won’t work. You cannot reach the header like that.

    #264156
    Paulie_D
    Member

    You forgot to include Jquery in your fiddle and as Jeroen says, you can’t do that with CSS as you can’t traverse UP the DOM with CSS.

    http://jsfiddle.net/e0xvL7fz/

    #264160
    cautionduster
    Participant

    Thank you Jeroen and Paulie!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design’ is closed to new topics and replies.