I am just wondering how I can print a background image in a div in bootstrap. I can see the image in the page but when I try to print it is not there.
Here is my html
<div class="row">
<div class="col-p-3 card">1</div>
<div class="col-p-3 card">1</div>
<div class="col-p-3 card">1</div>
<div class="col-p-3 card">1</div>
</div>
And here is my css
@media print {
.col-p-1, .col-p-2, .col-p-3, .col-p-4, .col-p-5, .col-p-6, .col-p-7, .col-p-8, .col-p-9, .col-p-10, .col-p-11, .col-p-12 {
float: left;
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
padding-top: 15px;
padding-bottom: 15px;
margin-right: auto;
margin-left: auto;
}
.card{
height: 200px;
width:200px;
background-image: url('card.jpg');
}
}
I can be able to print a background image for a whole page. I followed this link, How do I print only for a div? Will appreciate for any help