0
How to make a DIV adjust its height according to the background image?
.guaraparivirtual-guiacomercial-banner {
position:relative;
width:900px;
height:auto;
float:left;
background-color:#dddddd;
background-image:url(img-guaraparivirtual/icone-whatsapp.png);
background-repeat:no-repeat;
background-origin:border-box;
background-size:auto;
}
In this CSS above is what I use, but it doesn’t work. I need the DIV to automatically undetect the background image height and adjust.
I’m waiting for help!