yanivsplace — 2010-03-21T03:48:42-04:00 — #1
How can I make the div get effected on img:hover
i think that its some this like this
ralphm — 2010-03-21T07:55:04-04:00 — #2
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.
paulob — 2010-03-21T08:36:48-04:00 — #3
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).
yanivsplace — 2010-03-23T06:02:14-04:00 — #4