Could someone please tell me if the hover effect depicted here is possible with just CSS? Really would like to use this for my website if I can figure it out (so far no luck).
I'm not a programmer but have used simple techniques like sprites, changing background-color, and image-swapping for a button in the past. Unfortunately though, I have no idea how to apply such changes to multiple other divs on the page while hovering over said button :(
As seen in the sample, when the user hovers over the button an image "appears"/changes above the button and the background-color of the button and also the div below the button both change.
Someone told me I could have something like the following solution for all 3 classes and then use some inline styles for the background sprites on the button and image (and also the width of the div below the button). Maybe I didn't understand them though as the hover properties didn't carry through to the child classes when I tried it...
.button, .imageAbove, .divBelow {
background-color: #CCCCCC;
background-position: left top;
background-repeat: no-repeat;
width: 160px;
height: 40px;
}
.button:hover, .button:hover .imageAbove, .button:hover .divBelow {
background-color: #FFFFFF;
background-position: 0 -40px;
}
As you can see I'm struggling with this and I'm probably trying to do something that doesn't make any sense. I can find lots of tutorials on how to apply these things to just the button itself but surprisingly I haven't found anything showing me how to do what I want to do above.
If anyone out there could straighten me out it would be most appreciated!
Thanks