1 reply [Last post]
easinewe
Offline
newbie
NYC
Last seen: 4 years 33 weeks ago
NYC
Timezone: GMT-5
Joined: 2009-07-30
Posts: 3
Points: 4

I have a div called "Left Scroll" that contains other divs. "Left Scroll" has a background image and really just works as a container for the other divs and list within it.

What I would like to do is have the opacity of the "Left Scroll" background change whenever someone hovers over the content of the div. I have used opacity changes via CSS with links that work fine, but "Left Scroll" is not a link. Can a div have a hover option if it is not a link?

Thanks!

FataL
FataL's picture
Offline
Regular
Last seen: 4 years 47 weeks ago
Timezone: GMT-4
Joined: 2005-05-05
Posts: 19
Points: 12

easinewe wrote:Can a div have

easinewe wrote:

Can a div have a hover option if it is not a link?

Shure.
All major browsers and IE 7+ support it.

div.leftscroll { opacity:.5; filter:alpha(opacity=50) }
div.leftscroll:hover { opacity:1; filter:alpha(opacity=100) }