Troubleshooting problem with displaying background images on iPad and iPhone devices

A recent project involved building a website for a new client, but there seems to be an issue with the background rendering on his iPad and iPhone. The image is displaying incorrectly, showing only a small portion from the top right corner rather than the full picture.

Interestingly, the website looks fine on my PC, Android phone, and in browser emulators, but on his Apple devices, there are layout problems and a strange scrollbar appearing at the bottom of the iPad.

Below is the code snippet I used for setting the background image:

#fullHeightSection {
    width: 100%;
    height: 100vh;
    position: absolute !important;
    z-index: -1000 !important;
    background-image: url('/wp-content/themes/liveatlvlone/assets/barbg.jpg') !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

Here is how the website should look on a phone (link to image).

https://i.sstatic.net/nah9r.jpg

I also had a friend with an iPhone take a screenshot, which revealed the issue more clearly(link to image).

It appears to be a compatibility issue with iPads and iPhones, but unfortunately, I don't have access to those devices for testing. If you'd like to investigate further, you can visit the website at

Answer №1

To optimize /wp-content/themes/liveatlvlone/assets/barbg.jpg for different devices, I would create multiple versions such as @2x, @3x, @4x for iOS to ensure retina scaling. This can be done following guidelines from Apple.

Alternatively, using a different format like PNG may work better than jpg due to compression issues. Consider adjusting the JPG Compression level or converting to SVG format, which is more suitable for solid colors but could potentially work for the bar image.

https://i.sstatic.net/aaBbD.png

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

What is the best way to design this layout using HTML and CSS?

Can someone help me achieve this specific layout? / header width:100%, height: 100px (overlayed) / ///////////////////////////////////////////////////////////////////////////// / / ...

Turning my dual button navigation into tabs to display distinct HTML pages beneath a designated header

body{ background:url(background.jpg); background-size: cover; } h1{ font-family: 'Dancing Script', cursive; font-size: 5em; color: white; text-align: center; margin-top: 25px; margin-bottom: 20px; } h2{ font-size: 18px; color: white; text-align ...

Stable element placement in relation to its container

While dragging an element, it obtains a position: fixed. This particular element is located within a modal that is directly nested inside the body element. In the image below, the modal appears in gray, while the rest of the body is black, and the button ...

Move the menu position in Bootstrap 4 navbar

<div class="fixed-top"> <div class="collapse" id="navbarToggleExternalContent"> <div class="bg-dark p-4"> <h5 class="text-white h4">Hidden content</h5> <span class="text-muted">Toggleable via the ...

Utilizing CSS nested spans and setting custom width attributes

I'm curious about how nested spans and CSS handle the width attribute. In the HTML code provided, the 'wide' class sets the width while the 'box' class adds a border. I've noticed that the width is only applied when both class ...

Prevent scrolling on both md-sidenav and md-content in AngularJS Material

Currently, I am working on a website using AngularJs Material sidenav. My goal is to make both md-sidenav and md-content appear as one page, without any scroll bars showing up when the height of one element exceeds that of the other. How can I achieve th ...

The text alignment function of justify is not functioning properly

Trying to find a way to validate the content of this article, but I'm hitting a roadblock... <p style="text-align:justify;" class="custom-article"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt velit vitae risus t ...

Sequence of loading unique CSS skin for MediaWiki

Running a MediaWiki site with a personalized skin, I've noticed that the CSS code from my custom skin is being overshadowed by the default MediaWiki CSS. Is there a way to modify the sequence in which the CSS code is loaded? ...

What was the inspiration behind Spotify's section design?

Spotify has cleverly hidden the overflowing content without showing a scrollbar, allowing users to swipe through the list. How did they achieve this? I am currently using tailwindcss if that makes a difference. https://i.stack.imgur.com/z59yv.png ...

Challenges with altering the height of a div through animation

HTML <div class="blok1" ></div> <div class="blok2"></div> <div class="blok3"></div> CSS .blok1 { background-color: green; border-bottom-left-radius:15px; border-bottom-right-radius:15px; h ...

Create styles for each component based on their specific props when designing a customized Material-UI theme

I am having trouble styling the notchedOutline of a disabled <OutlinedInput /> in my custom MUI theme. My goal is to make the border color lighter than the default color when the input is disabled. Here is what I have attempted so far: const theme = ...

Ways to retrieve the current date on an iPhone

NSDate * currentSystemDate = [NSDate date]; When I try to retrieve the current date, I notice that it's one hour behind. I suspect this discrepancy is due to the use of UTC time. How can I obtain the actual current system date instead? ...

Automate the process of making Tailwind Classes non-Global with ease!

I am currently working on an application that consists of two main parts: (X) an older AngularJs legacy application with its own set of CSS classes. (Y) a new React application contained within a div. This new part (Y) is built using webpack, postcss, and ...

tips for adjusting the default color in nicedit

I recently noticed that after saving my text box edits, the background of the view page turns black. This makes it difficult to see the text, as the default color is also black. To test if there is any text, I highlighted it and realized that changing ...

Aligning elements of unknown width within a container of a specified width

Currently struggling to find a resolution to the following issue: Trying to create a navigation bar using a ul element set to a specific width of 530px with multiple li items nested inside. The goal is to have the li items evenly fill the 530px width wit ...

Prevent the underlining of the :before content of a link from being affected by a rule applied to the link

I have a hyperlink that becomes underlined when hovered over. I want to add a > symbol before the link, but I don't want it to be underlined when the link is hovered. Here's the code I'm using: .box.blueb a { color: #0098aa; } .box.blueb ...

Mpdf does not support inline CSS rendering

I recently implemented Mpdf into my Symfony project using Composer. The installation process involved running the following command: composer require mpdf/mpdf Next, I included the Mpdf.php file in autoload.php. Here is an example of how to use Mpdf in ...

Ways to secure a floating item onto a backdrop picture

Currently I am working on editing this page. When you hover over the cat, its eyes blink or two black dots randomly appear. My goal is to prevent the random blinking dots from appearing. I want to keep the hover object attached to the cat/background image ...

What is the best way to remove the background transparency of an image?

Images are being shown inside an HTML table using PHP code : This is the code for the table : for ($i = 0; $i < $data['list']['cnt']; $i++) { $tabRows[$i][1]['width'] = "45%"; $tabRows[$i][1][&apos ...

What is the best way to remove the empty space on the right side of a webpage while ensuring it remains responsive?

I noticed that there seems to be some extra space on the right side of the layout. I'm not sure how to adjust the Bootstrap code or CSS to fix this issue, or if I need to apply margin 0 or padding 0 somewhere in the code. * { box-sizing: border-b ...