Tagged: background
- This topic has 9 replies, 3 voices, and was last updated 7 years, 2 months ago by Mahesh.
-
AuthorPosts
-
February 18, 2017 at 11:19 pm #110193RonParticipant
Hello,
I have been using the Rock Star Pro theme. When setting my custom background I uncheck the “Scroll with Page” which works fine on all desktop browsers, but on my mobile browsers the image scrolls with page. I need the background image to stay static to create the same effect as the desktop browser do for consistency. This feature shows to work when in the editing mode for this theme. Please help.February 19, 2017 at 10:25 am #110226February 20, 2017 at 2:23 am #110250RonParticipantHi Pratik,
http://www.infocusphotographs.comThank you.
February 20, 2017 at 9:56 am #110283PratikKeymasterHi @Ron,
I checked the site on the phone and desktop and in both cases the bg image is fixed? Am I missing something?
Regards,
PratikFebruary 20, 2017 at 10:31 pm #110323RonParticipantYes the background should be fixed, but I don’t want the background to scroll with the page. On the desktop the background stays fixed but the remaining text and images on the page move over the fixed background to give a 3D look (Parallax?). On the mobile device it does not. The background on the mobile device moves or scrolls with the page. I want the look and feel of the desktop website to be the same on the mobile device.
February 21, 2017 at 9:55 am #110358MaheshKeymaster@ronmaf: Go to Dashboard=> Appearance=> Customize=> Additional CSS box and add the following CSS.
body.custom-background { background: url('http://www.infocusphotographs.com/wp-content/uploads/2017/02/sophie-sollmann-100865.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
Let me know if any problem.
Regards,
MaheshFebruary 21, 2017 at 10:20 am #110361RonParticipantHi Mahesh,
That did not fix the issue. Please let me know if there is another fix.
Thank you.February 21, 2017 at 12:44 pm #110374MaheshKeymaster@ronmaf: The issue seems to persist only on iphone, checking on other devices works fine. Here is a workaround for the iphone I found so far. So hope this will fix your issue.
body.custom-background:before { content: ""; display: block; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: -10; background: url('http://www.infocusphotographs.com/wp-content/uploads/2017/02/sophie-sollmann-100865.jpg') no-repeat center center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
Regards,
MaheshFebruary 22, 2017 at 2:45 am #110428RonParticipantGreat job Mahesh! it works! Thank you.
February 22, 2017 at 11:40 am #110452 -
AuthorPosts
- The topic ‘Background image>Scroll with Page>Mobile devices’ is closed to new replies.