I need help resolving an issue on my webpage where images in popovers overflow when they reach a certain size. I used an online demo to create the page, but now I'm encountering this problem. How can I fix it?
Check out the Js Fiddle for reference: https://jsfiddle.net/rdvL6kj9/10/
html:
<div class="container my-4">
<p class="font-weight-bold">Need assistance with adjusting popover image sizes? This example demonstrates how to include an image within a bootstrap popover.</p>
<a class="btn btn-primary" data-toggle="popover-hover" data-img="https://placekitten.com/500/300">Hover
over me</a>
</div>
...snip...
<p>js:</p>
<pre><code> // popovers initialization - on hover
$('[data-toggle="popover-hover"]').popover({
html: true,
trigger: 'hover',
placement: 'bottom',
content: function () { return '<img src="' + $(this).data('img') + '" />'; }
});
Below is a screenshot illustrating the issue: https://i.sstatic.net/TStdD.png