-2
Good evening, I’m having a hard time getting the following idea to work:
When I hover the mouse over a certain point, a box with an image appears, but I wanted this image inside the box to be responsive and adjust according to the screen size.
So I tried the following:
<div id="descricao" style="position:fixed; display:none; left:25%; top:25%; bottom:25%; right:25%;background:url(http://i66.tinypic.com/30201gn.png) center no-repeat ;opacity:9; box-shadow:0 2px 5px #000; border-radius:5px; text-align:center;">Descrição da Imagem, apenas mais um teste!</div>
I got the box to always appear in the middle of the browser, regardless of the size, the problem is the image inside the box, which is not adjusting.
How can I adjust the image inside the box?
background-size: contain was the solution to my problem, also in another question I was answered with background-size: cover, both helped a lot. Thanks!
– Thauã Corrêa Martins