I changed the background image of my website (minimal template). When I access my site on my phone (iphone) the background image is displayed in ultra zoomed, while with other brands such as Samsung the display of the site remains correct.
Do you have a solution for me?
The first photo is screened from my iphone, and the other from a samsung
It’s likely that the browsers have different default display settings and you’re missing a CSS property to tell the browser how to size the background.
You could try making sure that the container with the background image has the following CSS:
The problem is probably caused by the background-attachement: fixed; line - a lot of mobile browsers don’t support this at all.
Could you try removing that line and see if it solves the problem?
If you absolutely must have the fixed background you can either add the background image as a child elemend behind your content, and set that element to be a fixed element - which oddly IS supported on mobiles.
Or apparently you can use a media query just for iphones - I’ve never used this feature but for your setup it would look like:
@supports (-webkit-touch-callout: none) {
body {
background-attachment: scroll;
}
}
My recommendation is to just remove the background-attachment: fixed; line. Or remove it on all mobiles with a regular media query, rather than just on iphone, as it likely won’t work on at least some android phones despite working on the phone you’ve tested with.
Here is the link to access the site, I think you will be blocked on the first page of the site because it is still under construction. https://www.mypokertable.fr/