SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Forum topic div get effected on img:hover ?? has been created.

    Hello
    How can I make the div get effected on img:hover
    i think that its some this like this
    img:hover>div
    thanks

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Hi yanivsplace, and welcome to SitePoint!

    You'll need to post some HTML for a definite answer, as we don't know whether a child selector (>) is right in this instance.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi yanivsplace,

    An image isn't an element that has any children so a child selector (>) would be of no use in the format you have it.

    As Ralph said above we would need to see the html that you are trying to manipulate to give a precise answer.

    You can't actually hover an image element and affect a change to an un-related element. You could use the adjacent selector (+) and affect some sort of change on an adjacent element but it wont work in older browsers.

    I'm wondering if you are trying to produce some sort of tooltip effect which can be done by other means such as shown in this gallery rollover.

    Alternatively you could have the image as a background to a div and then create a over effect on a descendant element (IE6 would need to use an anchor for the hover effect as that is the only element it understands hover on).

  4. #4
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you
    very helpfull.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •