I have input element and paragraph element, I want the p element to be displayed only on hovering over the input element.
Here is what I tried
<html>
<body>
<div class="overlay">
<input id="inputCustomer" value="sometext">
</div>
<div class="content">
<p id="spandiv">This the p element</p>
</div>
</body>
<style>
#spandiv {
background-color: #232F34;
color:#FFFFFF;
opacity:0;
}
#inputCustomer:hover + #spandiv {
display: block;
opacity:1;
}
</style>
</html>