Is there a way to create a responsive triangle on an image that resizes properly and stays aligned? I'm currently having issues with it becoming misaligned. How can this be resolved?
.image {
width: 100%;
}
.image:after {
content: '';
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 20px solid #f5f5f5;
position: absolute;
left: 45%;
top: 63%;
transform: translatex(-50%);
/** making it horizontally center **/
}
<div class="image">
<img src="img/frankie.png" class="img-fluid">
</div>