-
AuthorPosts
-
July 11, 2023 at 6:13 pm #1413077
Hallo,
i have some color sections on the page in that a background image is set and text on top. It is also full screen section.
But if the view changes to smaler or mobile the background image is only showing the center of the image .. can i resize this backround image to mobile view so that it would be visible?July 12, 2023 at 9:02 am #1413106Hey Sebastian,
Thank you for the inquiry.
The background image may not be fully visible because it has a different aspect ratio compared to the section. We could adjust its size on smaller screens, but it may result in some distortion. Kindly provide the site URL in the private field so that we can inspect the elements.
Best regards,
IsmaelJuly 12, 2023 at 11:47 am #1413114top .. thx
July 13, 2023 at 6:45 am #1413186Hi,
We added the following css code to adjust the size and position of the background image.
#top.page-id-734:before { background-repeat: no-repeat; background-size: 100% 100% !important; position: fixed; background-position: center center; }This modification might distort the image a bit. If the result is not acceptable, try to replace the “background-size” value with “contain”.
Best regards,
IsmaelJuly 13, 2023 at 9:25 am #1413202Thx for feedback.
Yes, the images are disorted, not usable. By using “contain” it won’t fill out the full screen, only show a smaller version that fit into browser.July 14, 2023 at 8:42 am #1413283Hi,
You may need to revert it back to the previous value of “cover” in order to ensure the whole container is filled and maintain the aspect ratio of the background image. But as you already know, if the container has a different aspect ratio, the entire image may not be visible.
Best regards,
IsmaelJuly 17, 2023 at 11:05 pm #1413543Got it ..
background-position: center; added to custom css background image not in media query .. as simple it is :)Ticket can be closed
-
This reply was modified 2 years, 3 months ago by
xeovision.
July 18, 2023 at 3:29 am #1413548 -
This reply was modified 2 years, 3 months ago by
-
AuthorPosts
- The topic ‘Place background images in Mobile’ is closed to new replies.
