I'm trying to use the Bootstrap 4 card element to create a grid of images with overlaid headings, but I'm having trouble linking the image itself.
I attempted the stretched link method without success. I also tried placing the entire card in an anchor tag, but that didn't work either. Can someone please point out where I'm making a mistake?
<div class="row">
<div class="card text-white col-md-4 p-3 border-0">
<img alt="Card image" class="card-img" src="..." />
<div class="card-img-overlay">
<a href="..." class="stretched-link">
<h2 class="card-title">Title here</h2>
</a>
</div>
</div>
</div>
I expected the link to cover the entire card, as demonstrated on the Bootstrap website, but it doesn't seem to be working for me. Any assistance would be greatly appreciated!