-
-
Hi,
we added a background image to our website hey-sis.at, and it looks fine when testing the responsive behavior in the browser, but on the phone it shows only a part of the image, zoomed in and really ugly.
Our settings of the background image:
background position: center center
background size: cover
background repeat: no-repeat
bg. attachment: fixed
bg. blend: normalI wanted to add a screenshot of the responsive browser vs phone, but I didn’t understand how to?
Anyway, how can I ensure the background image looks the same on the phone as it does on the responsive browser?
Thank you in advance!
Best regards
-
Hi, when setting the background-size cover, the image tries always to fill the device screen size. So if the device is small it should extra zoom to fit in the new image rate.
you can fix it by adding a new bg image only for responsive. Try this:
Add a CSS class to that section. Than open custom CSS code and add this code:
@media (max-width:991px){ .css_class .bg-layer{ background-image:url('https://link to you image.jpg') !important; } }
Make sure that the new image has a vertical aspect ratio, this should fix your issue.
or you can try this code:
@media (max-width:991px){ .css_class .bg-layer{ background-size:100% !important; } }
but it should not fit totally the background in height.
Let me know
Thanks -
Hi,
I followed your steps, when testing in the browser it shows the new mobile image, but on the phone I still have the same problem..
I set the styleclass of the row div, is that correct?
BR Bianca
-
Can you please let me know, which image you are trying to fix on mobile?
Thanks
-
Hi,
thank you for your answer!
I am trying to fix the background image of the row ‘mitglieder’ and ‘kontakt’.
It’s supposed to show https://www.hey-sis.at/wp-content/uploads/2020/04/neu_kontakte.png on big screens and https://www.hey-sis.at/wp-content/uploads/2020/04/mobile.png on mobile. I added the extra styleclass ‘hintergrund’ to the rows ‘mitglieder’ and ‘kontakt’ and added the following CSS code:
@media (max-width:991px){
.hintergrund .bg-layer{
background-image: url(‘https://www.hey-sis.at/wp-content/uploads/2020/04/mobile.png’) !important;
background-attachment: fixed !important;
}
}Did I miss something?
I just checked it again on my phone, and there’s none of the two background images shown anymore at all..
Thank you so much for your time!
BR Bianca
-
Hello,
I think that you have to add this custom css into the CSS above and add this custom line of css:
@media (max-width:991px){ .hintergrund .bg-layer{ background-image: url(‘https://www.hey-sis.at/wp-content/uploads/2020/04/mobile.png’) !important; background-attachment: fixed !important; background-size:center center !important; } }
I have added background-size:center center !important;
Regards!
-
Hey,
sorry for the late reply. I added <span style=”color: #4b4d4d; font-family: Raleway; font-size: 14px;”>background-size:center center !important but the image is still not shown on mobile devices :(</span>
Any other ideas?
BR Bianca
-
Hello,
Please share with me your wp credentials, so I can make some tests until finding the real solution to this problem.
You can make also the last try to change :
background-size: contain !important;
Let me know.
Regards!
-
-
-
Hi Eldo,
sorry I didn’t get a notification that you already replied..
It still doesn’t work on the phone :-(
Does it look fine on yours?
Best regards,
Bianca
-
-
You must be logged in to reply to this topic.