Having an issue with displaying an image behind text on a mobile device. The website looks fine on desktop and even in mobile mode from the console, but once deployed and viewed on an actual mobile device, the image becomes stretched out.
Tried setting width and height to auto and allowing max-width as 100%, but it creates other issues with the image.
Here's how it appears on desktop https://i.sstatic.net/9yyta.png. And here's how it displays in cellphone mode in Chrome console https://i.sstatic.net/kORcg.png. However, this is how it shows on an actual mobile device https://i.sstatic.net/9ftSy.jpg[https://i.sstatic.net/9ftSy.jpg][1]
HTML
<div class="row d-flex text-center justify-content-center pb-4 footerWithImage">
<div class="row mt-4 d-block text-white col-lg-5">
<!-- Content -->
<h6 class="text-uppercase font-weight-bold">Carson Moore Fitness</h6>
<hr class="bg-light mb-4 mt-0 d-inline-block mx-auto" style="width: 60px;">
<p>Helping clients build muscle, burn fat and improve posture using safe and effective,
personalized fitness programs.</p>
</div>
<div class="row mt-4 d-block text-white col-lg-5 footerContacts">
<!-- Links -->
<h6 class="text-uppercase font-weight-bold">Contact</h6>
<hr class="bg-light mb-4 mt-0 d-inline-block mx-auto" style="width: 60px;">
<br>
<a href="https://g.page/sandcastlefitnessclub-24hrs?share"><i class="fas fa-home mr-3"></i>White Rock,
Surrey, BC</a><br>
<a href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9ceff3f1f9f3f2f9dcf9e4fdf1ecf0f9b2fff3f1">[email protected]</a>?Subject=Hello%20again" target="_top"><i
class="far fa-envelope mr-3"></i> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e78e898188a78486959488898a88889582818e9389829494c984888a">[email protected]</a></a><br>
<a href="tel:604-555-5555"><i class="fas fa-phone mr-3"></i>+16045555555</a>
<div id="socialMediaLinksDiv">
</div>
</div>
</div>
CSS
.footerWithImage {
background: url("https://images.unsplash.com/photo-1563685759732-3b118f9445c3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80");
background-attachment: fixed;
background-size: cover;
background-repeat: no-repeat;
background-position: center 20%;
}
Note: Issue resolved. Check my answer