Forums

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

Home Forums CSS css selectors

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #46288
    asma
    Participant

    hellow
    i have a main div contaning 5 list items and a div containing an image.i want to move the div (containing an image) when hover on a list item.how is it possible with css?

    #142114
    asma
    Participant

    want to do this task with css selectors.

    #142122
    Paulie_D
    Member

    Could you put your HTML & CSS in Codepen so we can see what you have?

    What do you mean by ‘move the div’?

    #142124
    asma
    Participant

    i mean i want to animate that div.

    #142125
    asma
    Participant

    `

    `
    when hover on any link smallscale div animates

    #142128
    Paulie_D
    Member

    Please put your code into Codepen.

    #142129
    asma
    Participant

    any solution?

    #142130
    SamuelNeudeck22
    Participant

    [https://css-tricks.com/almanac/properties/a/animation/](https://css-tricks.com/almanac/properties/a/animation/ “”) try looking here if you don’t see what you need it may be easier to use jQuery on your div. search codeacademy or W3schools for more specific jQuery animations. If you could provide a link to your site or a codepen that is preferred so we cans see your code and more easily troubleshoot your problem.

    #142133
    Paulie_D
    Member

    >any solution?

    As before, please put your code (HTML & CSS) into Codepen.

    #142137
    asma
    Participant
    #142138
    asma
    Participant

    what i want is when hover on any list item green div move to left

    #142140
    asma
    Participant

    is this possible with pure css?

    #142142
    amoss
    Participant

    li:hover ~ #smallscale{
    margin-left: -100px;
    }

    http://jsfiddle.net/9Fhgm/3/

    #142143
    Paulie_D
    Member

    I don’t think there is a selector that will let you select the image div based on a list item or anchor link.

    It can be done based on the **whole** menu (using the sibling connector `~` ) but I’m guessing that’s not what you are after.

    JS/JQ will be the answer…depending one what it is you are actually trying to do.

    #142145
    asma
    Participant

    thanks amoss and paulie_D :)

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