3
I’m having difficulty making this image fit inside the box, I want regardless of the size of the screen the box always appears in the same place (OK) and the image inside fits the size of the box (HELP).
Follows the code, mouseover
and the div
of the box image:
<html>
<head>
<div style="position:fixed;right:35%;top:10px; left:35%; ">
<img src="https://i.stack.imgur.com/IrSrV.png" onmouseover="getElementById('descricaoo').style.display='block'" onmouseout="getElementById('descricaoo').style.display='none'"></a>
</div>
</head>
<body>
<div id="descricaoo" style="position:fixed; display:none; left:25%; top:25%; bottom:25%; right:25%;background:url(https://i.stack.imgur.com/PhdPC.png) center no-repeat ; box-shadow:0 2px 5px #000; border-radius:5px;">
</div>
</body>
</html>
I need the image to fit inside the box, please, can someone help? Image that should appear in full inside the box:
I edited the answer, you can run to test if that’s how you want it.
– Gabplay