Matt_Lifelancs Posted January 18 Posted January 18 Hey people, I am using Code Injection to keep my page background image fixed while the sections move over the top. It is working great on desktop view, but doesn't seem to work on mobile view. Would anyone be able to let me know what I am missing with this... (p.s. I'm not super knowledged with coding. This website was made through self teaching mostly via youtube and Chatgpt. haha) <style> .header, #footer-sections{ display:none !important;} #page{ background-image:url(https://images.squarespace-cdn.com/content/6486db2ea9f57144972f519e/ddab9b56-c024-4210-a0f7-8882c5aafb48/Rise+Up+Background.jpeg?content-type=image%2Fjpeg); background-size: 100%; background-attachment:fixed !important; } /* Make the page section backgrounds transparent */ #page .page-section { background: transparent!important } #page .page-section .section-background { background: transparent !important; } .section-border{opacity:0!important} </style> Any help would be super appreciated.
Web_Solutions Posted January 18 Posted January 18 1 hour ago, Matt_Lifelancs said: Hey people, I am using Code Injection to keep my page background image fixed while the sections move over the top. It is working great on desktop view, but doesn't seem to work on mobile view. Would anyone be able to let me know what I am missing with this... (p.s. I'm not super knowledged with coding. This website was made through self teaching mostly via youtube and Chatgpt. haha) <style> .header, #footer-sections{ display:none !important;} #page{ background-image:url(https://images.squarespace-cdn.com/content/6486db2ea9f57144972f519e/ddab9b56-c024-4210-a0f7-8882c5aafb48/Rise+Up+Background.jpeg?content-type=image%2Fjpeg); background-size: 100%; background-attachment:fixed !important; } /* Make the page section backgrounds transparent */ #page .page-section { background: transparent!important } #page .page-section .section-background { background: transparent !important; } .section-border{opacity:0!important} </style> Any help would be super appreciated. What is the website URL? If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible.
Matt_Lifelancs Posted January 19 Author Posted January 19 19 hours ago, Web_Solutions said: What is the website URL? https://lifelancs.org/riseup
Solution tuanphan Posted January 21 Solution Posted January 21 background-attachment: fixed won't work on mobile, you can consider disable effect on mobile only Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
ToneRangerGuitars Posted August 12 Posted August 12 Do you know how to disable the effect on mobile only? I'm running into the same issue where I have my homepage just how I want it on desktop, but it looks terrible on iOS. my site is tonerangerguitars.com
tuanphan Posted August 14 Posted August 14 On 8/12/2024 at 1:12 PM, ToneRangerGuitars said: Do you know how to disable the effect on mobile only? I'm running into the same issue where I have my homepage just how I want it on desktop, but it looks terrible on iOS. my site is tonerangerguitars.com Change your code body section[data-section-id="66b99e1c0610407e26877c32"] .section-background { background: url('https://static1.squarespace.com/static/665613bd6f16df4119fe55a9/t/66ba84259ebbc3090b01f43d/1723499562439/3332LAYERS+-+Poster+18.25+x+28.25+copy+2.jpg'); background-attachment: fixed !important; background-repeat: no-repeat !important; background-size: cover !important; background-position: center center !important } to this @media screen and (min-width:768px) { body section[data-section-id="66b99e1c0610407e26877c32"] .section-background { background: url('https://static1.squarespace.com/static/665613bd6f16df4119fe55a9/t/66ba84259ebbc3090b01f43d/1723499562439/3332LAYERS+-+Poster+18.25+x+28.25+copy+2.jpg'); background-attachment: fixed !important; background-repeat: no-repeat !important; background-size: cover !important; background-position: center center !important } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment