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 does not work. I need the DIV to automatically detect the height of the background image and adjust.
I look forward to helping you!