Forums

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

Home Forums CSS CSS3 – Target multiple div elements on Hover

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42290
    itsmejainh
    Member

    Hi,

    I am trying to achieve a functionality where in I can target multiple div elements and move them to respective positions by hovering on one element.

    Please refer this fiddle: **http://jsfiddle.net/srjzA/4/**

    Here, I have four elements – 1,2,3,4. When, I hover on element 1, I want remaining three elements to move to extreme left one below another.

    I was able to move one element (2), but I couldn’t stop that element at the desired position.

    Please suggest.

    Thank you.

    #143801
    Chester
    Participant

    They say you can’t with just CSS alone unless the div’s are siblings of the hovered element.

    http://stackoverflow.com/questions/4605806/target-multiple-html-properties-with-csshover

    #143829
    Paulie_D
    Member

    It can be done but it will require multiple animations and using the sibling connector (~)

    #143886
    PicnicTutorials
    Participant

    Just nest all the divs in a parent div. target them by… div + div. and css3/jquery the animation. Should be pretty easy.

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