I'm trying to make a div with some information about an image appear when I hover over the image, my code doesn't seem to work.
HTML:
< div class="batmobile-info">This is Batman's batmobile, he uses it to chase his enemies or to flee from the police.< /div>
< img class="batmobile" src="images/batmobile.png" alt="batmobile" >
CSS:
.batmobile{
position:relative;
width:500px;
height:200px;
top:350px;
left:200px;
}
.batmobile-info{
visibility:hidden;
}
.batmobile:hover .batmobile-info{
background-color:white;
text-align:center;
width:290px;
height:40px;
position:absolute;
top:500px;
left:700px;
visibility: visible;
}