I am facing an issue with my webpage that consists of 6 small images and one large image in the center, made up of six layers each containing one image, similar to this example: http://jsbin.com/onujiq/1/. I have set the z-index property of all center images to (-1). My objective is to make it so that when I hover over one of the small images, the corresponding image appears as the central large image by changing the respective image's z-index to 5. However, no matter what I try, I cannot achieve the desired outcome. Any help would be greatly appreciated (I am only using CSS); thank you in advance!
Additionally, while testing the hover effect, I encountered a puzzling problem. When I use the following code:
#img3:hover + #img4{
opacity: 0.2;
}
This code works as expected. But when I try this:
#img3:hover + #img5{
opacity: 0.2;
}
It does not work! I am still unsure why there is such a big difference between #img4 and #img5. Can someone provide some insight on this?