Forums

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

Home Forums CSS Please help with simple css transitions – One element hover effects another

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #271872
    cliff5sta
    Participant

    Hi folks,
    I’ve done this before, but I cannot redo it! Mmm, and now I dont know where to look.
    I am trying to get a simple CSS markup for when you hover on one element and it activates transition on another element.
    See my codepen here:
    https://codepen.io/cliff5sta/pen/gKpwoE

    CSS transitions are very simple, but for the life of me, I forget how I did this before!
    CLiff

    #271880
    tomnoble92
    Participant

    Beverleyh’s answer is correct below

    #271881
    Beverleyh
    Participant

    You can with the adjacent sibling selector ;) .trigger:hover + .action
    https://css-tricks.com/almanac/selectors/a/adjacent-sibling/

    #271888
    tomnoble92
    Participant

    Nice one didn’t know that…learn something new everyday!

    #271937
    cliff5sta
    Participant

    Great that worked for me, thank you Beverleyh

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