This worked perfectly!! Thank you so much!
Topic summary
A user encountered an issue where their full-page background image displays correctly on desktop and Android devices but appears extremely zoomed in and pixelated on iPhones.
Original Implementation:
- Used CSS with
background-size: coverandbackground-attachment: unsetin media queries - Applied to a
.gradientclass in base.css - Different image files for desktop vs. mobile viewports
Attempted Solutions:
- Initial suggestion to change
background-attachmenttounsetin mobile media query didn’t resolve the issue - Image only displayed correctly in header, not across full page
Working Solution:
Implemented a CSS fix using a pseudo-element approach:
- Removed background from
.gradientclass on mobile (background: none !important) - Created
body.gradient:beforewith fixed positioning - Set dimensions to
100vwand100vhwithz-index: -1 - Applied background image to the pseudo-element instead
Status: Issue resolved successfully. The background now displays properly across all devices including iPhones.