Forums

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

Home Forums CSS change display on hover

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44516
    saiphani117
    Member

    #right
    {
    position:absolute;
    top: 287.5px;
    right: 127px;
    z-index: 99;
    display:none;
    }
    #left
    {
    position:absolute;
    top: 287.5px;
    left: 127px;
    z-index: 99;
    display:none;
    }

    #slide1:hover ~ #left
    {
    display:block;
    }

    `

    `

    ``
    ``
    `

    `

    I want to change the display property of left and right id’s on hover of id slide1.

    #133931
    CrocoDillon
    Participant

    `~` is a sibling selector, it’s hard to say if that’s what you need without seeing your markup. But I guess you would need to change that to `#slide1:hover #left`.

    #133944
    Paulie_D
    Member

    Code was there…I’ve hacked the post about to get it to show.

    `#slide1:hover #left` would work

    as would

    `#slide1:hover > #left`… I think.

    http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/

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