I'm having trouble displaying an image perfectly within my div. The image doesn't cover the entire box. Here is my code:
.card-background{
background-image: url("../../../assets/imgs/back-blank.png");
border-radius: 10px;
margin-top: 2%;
height: 180px;
background-size: contain;
background-repeat: no-repeat;
}
<div class="card-background">
</div>
My image is 1200 px wide, which should be enough to cover the div. I want it to fit perfectly inside the div.
If I use background-size: cover;, the image gets cropped in the div. Here is the image: