I've been struggling to insert an image inside a header within a Bootstrap card. Despite trying various solutions, nothing seems to work.
Below is the code snippet:
<div class="container">
<div style="padding: 20px 0px;" *ngFor="let blog of blogs">
<div class="card">
<div class="card-header" (click)="navigate('Blog')">
<a (click)="navigate(blog.title)">{{ blog.title }}</a>
</div>
<div class="card-body">
<p class="card-text">
{{ blog.summary }}
</p>
</div>
</div>
</div>
</div>
CSS:
.card-header {
background: rgba(0, 255, 0, 0.61);
color: rgb(0, 0, 0);
font-weight: bold;
cursor: pointer;
}
.card-body {
background: #43484d;
}
.card-text {
color: #6cffce;
font-weight: bold;
}
I've attempted using the following:
background-image: url(imagepath)
However, it didn't yield any results. I also experimented with:
<image src ...>
to create an overlay effect, but that wasn't successful either. My goal is to place an image in the header with transparency and a colored overlay on top (similar to looking through glass).