- This topic has 7 replies, 2 voices, and was last updated 3 years, 7 months ago by David.
-
AuthorPosts
-
September 19, 2020 at 9:04 pm #1450488Gary
I have two fixed background cover images on my mobile page and it works fine on Android, but is broken on iOS. I have looked around on this forum and tried the following CSS:
@media (max-width: 768px) { .gb-container { background-attachment: scroll !important; } }
Sadly, it hasn’t worked. Also, on Apple phones there seems to be a grey vertical column down the right-hand side of the screen.
I’m wondering whether you have come across this before and have any suggestions. Thanks, Gary
September 20, 2020 at 4:44 am #1450788DavidStaffCustomer SupportHi there,
do you mean the Page Hero images ?
September 20, 2020 at 5:16 am #1450837GaryHi David,
No, the page hero parallax image works fine.
I have two Cover images inside the page (not on the Desktop, they are mobile only). I have set these ‘cover’ images to ‘fixed background’ so the text smoothly scrolls over the pictures and people scroll the screen on their phone. It is working perfectly on Android, but is broken on iOS.
September 20, 2020 at 5:54 am #1450867DavidStaffCustomer SupportIf they are mobile only then why not simply deselect the parallax option?
If not then you need to target the cover block as that is the element where the image exists.
ie>
@media (max-width: 768px) { .wp-block-cover-image.has-parallax, .wp-block-cover.has-parallax { background-attachment: scroll !important; } }
Alternatively why not just add the Background image to the Container block and not use the Cover block at all. You can set Container blocks to a min height.
September 20, 2020 at 9:39 pm #1451605GaryThanks David. I think I have underlying problems on the site as I am unable to add a background image in the container. Each time I press ‘Set Background Image’ for the container, it opens up a media popup to set a featured image for the page. I have no idea whether this is a GP issue or a Gutenberg Block issue.
Generatepress: Version: 3.0.0-beta.1
GP Premium: Version: 1.12.0-beta.1September 21, 2020 at 1:25 am #1451783DavidStaffCustomer SupportWe saw this issue elsewhere before.
I recall it being a plugin conflict. Can you try temporarily disabling all other plugins aside for GPP and GB.let us know.
September 21, 2020 at 3:37 am #1451950GaryHi David,
Yep, you are right. I have found the culprit.
It is the Google Amp (Version 2.0.3). I think I might abandon AMP pages for now as I am busy changing all my pages to completely remove Elementor from my site, so as I will only be using the GP, the pages should be light enough without AMP.
Sadly, however, even using the Background Image in a Container, the parallax function (attachment: fixed) still doesn’t work with Apple phones. It is perfect on both the desktop and Android mobiles. Baffling 🙁
September 21, 2020 at 4:19 am #1451987DavidStaffCustomer SupportThe cover block is still being used and that is using some other code for the Parallax effect – which cannot be overridden with just some CSS by the looks of it.
Fixed Backgrounds on the GB Container Block will be removed on mobile in the next update.
In the meantime your original CSS should apply here. -
AuthorPosts
- You must be logged in to reply to this topic.