The image appears distorted on IOS devices and Safari, yet displays perfectly on Chrome

I have been working on a project for genesisai.bio, and it functions flawlessly in Chrome. However, I've encountered an issue where an image stretches on Safari and iOS devices. Can someone guide me on how to resolve this problem? I've experimented with setting height: auto on relevant media spots and also tried utilizing flexbox. Since I'm relatively new to web development, I haven't been able to find a solution yet. Any assistance would be greatly appreciated!

EDIT:

<section class="banner-area relative" id="home">
                <div class="container" >
                        <div class="row fullscreen align-items-center justify-content-center">
                            <div class="banner-content col-lg-6 col-md-12">
                                <h1 class="text-uppercase">
                                    Sharing data your way <br>
                                </h1>
                                <p>
                                    ABCDEEFF
                                </p>
                                <button class="primary-btn2 mt-20 text-uppercase " onclick="window.location.href = 'survey.html';"> Get Started <span class="lnr lnr-arrow-right"></span></button>
                            </div>
                            <div class="col-lg-6 d-flex align-self-center img-right">
                                <img class="f-img img-fluid" src="img/back.jpg" alt="">
                            </div>
                        </div>
                </div>
            </section>
::-moz-selection {
  /* Code for Firefox */
  background-color: #2482ff;
  color: #fff;
}

::selection {
  background-color: #2482ff;
  color: #fff;
}
/* More CSS styling goes here... */

Answer №1

Kindly delete the d-flex class from the following code snippet:

<div class="col-lg-6 d-flex align-self-center img-right">
  <img class="f-img img-fluid" src="img/back.jpg" alt="">
</div>

Please inform me if this change resolves the issue.

Answer №2

To solve the issue of stretched images on iOS, you can use the following class:

.ios-strech-fix
{
      height: intrinsic;
}

This will adjust the height to maintain the correct aspect ratio of the image, preventing it from stretching but instead scaling the height proportionally to the width.

We found this solution helpful and have incorporated it into all our websites.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

RxSwift allows you to generate multiple Observable instances from a single source

Is there a way for me to efficiently share one API call? Consider this scenario: I have a Model class with properties that need to be bound to various UI components in the ViewController. However, exposing the Model directly to the View layer may not be ...

Cover the whole page in darkness and emphasize the division element

I attempted to implement a solution I found on stackoverflow without success. The issue is that the blackout feature does not seem to activate - nothing happens. Within my JavaScript code (all enclosed in the $(document).ready(function () tag), it appears ...

Alternate the color over time using CSS

Is there a way to dynamically change the color of a div from black to white every two seconds, and then from white to black, continuously toggling as long as the div is visible? Essentially, I want the div to only be displayed when a user clicks and drag ...

Developing an iOS app with a UIScrollView and Auto Layout, utilizing the UILayoutFittingCompressedSize

Following Apple's guidelines for implementing Auto Layout with UIScrollView, I found the information at this link. The guideline suggests creating a view subtree to place in the scroll view, setting up constraints, and using the systemLayoutSizeFitti ...

Get rid of the underlined anchors in your email signature

I'm currently in the process of creating personalized email signatures for one of my clients. At this point, I am testing them on various platforms such as GMail, Hotmail, Brinkster, and more. One issue I am facing is trying to remove the underline t ...

Enabling users to create rectangular shapes on a UIImage for the purpose of cropping the image

I am certain this question has been asked numerous times in various ways, yet I have not found a satisfactory answer here. My Objective I aim to display a UIImage and enable the user to draw a rectangle on the image for eventual cropping of their selectio ...

Switch ng-model in Angular to something different

I am looking to transform my own tag into a template <div><input .../><strong>text</strong></div> My goal is to have the same values in both inputs. Check out the plunker here If I change the scope from scope: {value:' ...

Is there a way to automate testing for my web application bundled with webpack against FUOC?

After creating a React + Redux web app bundled with webpack, I encountered a bundling error that caused my website to display flash of unstyled content (FUOC) behavior. Certain components did not inject their CSS into the server response, resulting in pa ...

Using Media Queries to Optimize Image Display for Higher Pixel Densities: @2x, @3x,

My current project involves supporting various pixel ratios on the website I am developing. I want to make sure that I include all necessary browser prefixes to ensure compatibility with a wide range of devices and browsers. While I am using SVGs whenever ...

Discovering all invalid elements in an Angular 8 Form using Typescript by revealing required fields post button click

Once the button is clicked, I want to retrieve all invalid elements in the Form and showcase those fields that are either incomplete or required. ...

Inject HTML into a div element without altering the surrounding content of the page

After observing numerous individuals inquiring about how to load HTML into a div, I managed to come up with code that accomplishes this task flawlessly. However, there is a peculiar issue where the remaining content on the page undergoes changes once the H ...

Is there a way to potentially utilize window.open() to open a specific section of a webpage?

My HTML page consists of 2 div blocks and 2 links. I want to open the content of the first div in a new window when the first link is clicked, and the content of the second div in another new window when the second link is clicked. You can find the code h ...

Incorporate a Captcha image into your Laravel application without the need for any additional packages

After successfully uploading a laravel app, my boss requested that I add a captcha image to the website. However, all the captcha techniques for Laravel I've researched require installing a package, and I'm hesitant to reupload the entire website ...

Incorporating visuals into your HTML email

After struggling with this issue for quite some time, I finally managed to get it to partially work. However, the code displays the three images correctly embedded on some email clients, attaches them as attachments on others, and doesn't show them at ...

I can no longer hear any sound after extensive use of AVAudioPlayer - Seeking assistance with error code "AppleAudioQueue.39.189049" (25) showing flags=0x2 and errno=24

Greetings, I'm new to this and I'm likely making a lot of mistakes, so I could really use your expertise and assistance! I'm working on a music app that utilizes the AVFoundation Framework. During testing on my Macbook and iOS Devices, it p ...

Initially, the 'display none' CSS command may not take effect the first time it is used

I am currently working on a slideshow application using jquery.transit. My goal is to hide a photo after its display animation by setting the properties of display, transform, and translate to 'none' value. Although the slideshow application work ...

Transferring the offset of jQuery from one element to another results in their positions being misaligned

In the quest for aligning content vertically between two divs, I have encountered a challenge. Despite my efforts to adjust offsets and heights, the new element in the second div still does not align perfectly with the first one. This is evident in the cod ...

Tips for positioning a modal in the center specifically for zoomed-in mobile devices

I created a modal that uses the following function to center itself: center: function() { var top=Math.max($window.height() - $modal.outerHeight(),0) / 2; var left=Math.max($window.width() - $modal.outerWidth(),0) / 2; $modal.css({ ...

No match was found for the reverse of 'idname' with arguments '()'. Attempted 1 pattern: ['viewRegistration/(?P<pk_test>[0-9]+)/$']

When setting up my views, I have the following code: def home(request): if request.user.participant: current_user = request.user subscriptionUser = int(Subscription.objects.get(participant=current_user.participant).id) else ...

How to properly format an HTML input box for numeric entry and ensure correct formatting of the minus sign

I need assistance with formatting an HTML text input box to only accept numeric values using JavaScript. Specifically, the input should allow digits, a minus sign, or a dot/comma (which will be converted to a dot). However, I want to prevent multiple conse ...