- This topic has 24 replies, 5 voices, and was last updated 2 years, 4 months ago by David.
-
AuthorPosts
-
November 25, 2021 at 12:50 am #2020882rafel jesus
Hi Elvin
On the desktop version in both languages, the image on all pages are well, in frontpage is bigger than the other ones, that are how I like it, can you see here
I did your recommendations on frontpage image, I only put the CSS but the image isn’t hide on the mobile version.
The code of background-position I left in ittop center
because I like how the image looks on the desktop version.
But this codetop center
affects me on the mobile version, because it keeps it, I can not change it.On the other pages, Who we are, My account and How we can help you in mobile version, now look well.
If you need access to the backend to revise it, tell me how I’ll send you the codes.
November 25, 2021 at 9:15 pm #2022626TomLead DeveloperLead DeveloperBackground images and aspect ratios on multiple devices can be difficult.
Typically, I would suggest using a different image on mobile – one with an aspect ratio that suits the width of mobile vs one built for desktop. GenerateBlocks Pro has an Advanced Backgrounds feature that allows you to set different images on different devices.
Without it, you can use CSS to define a different image. Let us know if you want to give that method a try and need help with the CSS 🙂
November 26, 2021 at 12:44 am #2022781rafel jesusHi Tom.
This project is already finished and how much I make the budget I include the plugins that I can use to develop the project and now that it is already finished, therefore now I cannot include another plugin.
So I have to do it via CSS, but I’m not much code if you can help me with the code would be appreciated.
For future projects, I think I will use GenereteblocksThank you so much
November 26, 2021 at 7:47 am #2023827DavidStaffCustomer SupportHi there,
to swap the image using CSS try the following:
1. Select the Container Block with the background image. In Advanced > Additional CSS Class(es) – add a custom class eg.
hero-container
2. Now add the following CSS with your mobile image URL:
@media(max-width: 768px) { .gb-container.hero-container::before { background-image: url(https://the_full_url_to_the_replacement_mobile_image); } }
November 26, 2021 at 10:28 am #2024496rafel jesusNovember 27, 2021 at 3:52 am #2025901DavidStaffCustomer SupportWhere did you add the CSS? I cannot see it on the site.
Can i suggest you disable WP Rocket and SG Optimizer – this will ensure any CSS updates are not affected by their caches.
November 27, 2021 at 5:37 am #2026015rafel jesusNovember 28, 2021 at 5:02 am #2027337DavidStaffCustomer SupportIn the CSS you need to replace:
https://the_full_url_to_the_replacement_mobile_image
with the URL for your mobile image.
November 28, 2021 at 5:10 am #2027342rafel jesusHi Davis.
The media URL, that I gonna upload.
ThanksNovember 28, 2021 at 6:30 am #2027433DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.