I have two images in html and both are in the same place on the page. What I want to do is touch the hovered images. I hidden an image with display: none and when hover the display is block, but it is not working. Any ideas?
.left_corpo .restaurantes{
position: absolute;
height: 30%;
width: 17%;
margin-left: 15%;
margin-top: 12%;
cursor: pointer;
}
.left_corpo .restaurantes_hover{
position: absolute;
height: 30%;
width: 17%;
margin-left: 15%;
padding-top: 12%;
display: none;
cursor: pointer;
}
.restaurantes:hover + .restaurantes_hover {
display: block;
}
.restaurantes_hover:hover{
display: block;
}
<div class="left_corpo">
<div class="restaurantes">
<img src="<?php echo $restaurantes; ?>" onclick="abrirlayer('layer_restaurantes')">
</div>
<div class="restaurantes_hover">
<img src="<?php echo $restaurantes_hover; ?>" onclick="abrirlayer('layer_restaurantes')">
</div>
</div>