Hi,
Below I have some CSS which is displaying an image on my website however, if I set height to "auto", no image displays at all. It will only display if I set a px value.
How can I get "height: auto;" to work?
Below I have some CSS which is displaying an image on my website however, if I set height to "auto", no image displays at all. It will only display if I set a px value.
How can I get "height: auto;" to work?
CSS:
#my_image_div {
max-width: 100%;
height: auto;
background-image: url("https://mywebsite.com/wp-content/uploads/2022/03/lower-blocks.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}