Struggling to set a background-image with the 'cover' size property inside a div. Despite trying different values for background-size, the image always shows up in full size within the div.
I've searched for similar answers on SO, but nothing has worked so far.
What am I overlooking?
#page {
background: #fff;
width: 100%;
margin: 0 auto;
margin-top: 0px;
display: block;
/*padding: 40px 40px 50px 40px;
position: relative;*/
z-index: 0;
}
.status {
position: absolute;
text-indent: -5000px;
width: 150px;
height: 61px;
}
.Paid {
background-image: url(<?php echo base\_url();?>assets/blueline/img/status-paid.png);
background-position: center;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
<div id="page">
<div class="status Paid">
</div>