Mofoxdesign Posted July 16 Share Posted July 16 Hi! I have a background video for my hero section on my website. I would like to replace that video with a fixed image for the mobile layout and can't seem to find a way to do that so that's why I'm reaching out to the community! I would like to be able to resize the text on this hero section for the mobile layout as well. Thank you in advance for any help you can bring me 🙂 Link to comment
Lesum Posted July 16 Share Posted July 16 @Mofoxdesign Hi! Can you share your site URL for context? Also, if you haven't already, set your mobile fallback image in the section background settings. If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
Mofoxdesign Posted July 16 Author Share Posted July 16 (edited) Hey @Lesum Thank you for your quick response! Here's the url : https://manifest-design.com/home-2 And yes, I have set the fallback image in the section background settings. Edited July 16 by Mofoxdesign Link to comment
Lesum Posted July 16 Share Posted July 16 @Mofoxdesign You can add this code in Website > Pages > Website Tools > Custom CSS @media screen and (max-width:767px) { section[data-section-id="66967f6c4958591ff334c52c"] { .section-background video { opacity: 0 !important; } .section-background img { opacity: 1 !important; } } } Mofoxdesign 1 If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
Mofoxdesign Posted July 16 Author Share Posted July 16 @Lesum Cool, so this works, but is there a way of setting a different image than the fallback image? Because the fall back image is also used for the desktop version when the internet is slow. Thank you 🙂 Link to comment
Solution Lesum Posted July 16 Solution Share Posted July 16 @Mofoxdesign Sure thing! You can update the previous code I shared to the following: @media screen and (max-width: 767px) { section[data-section-id="66967f6c4958591ff334c52c"] .section-background video { opacity:0 !important } section[data-section-id="66967f6c4958591ff334c52c"] .section-background img { opacity: 0 !important } section[data-section-id="66967f6c4958591ff334c52c"] .section-background { background-image: url("your-image-url"); background-size: cover; background-position: center; background-repeat: no-repeat; } } tuanphan 1 If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
Mofoxdesign Posted July 16 Author Share Posted July 16 @Lesum That's awesome! It worked perfectly! Thank you so much! God bless you! Lesum 1 Link to comment
Mustberoz Posted August 7 Share Posted August 7 Hi there, Im having this same issue. I copied and pasted that code and found the URL for the image I'd like to use on mobile but unfortunately, nothing has changed. I also tried with the first set of code for the set fallback image and that didn't work as well. Would there be a setting/button i'm missing to make this work? Thank you! Link to comment
tuanphan Posted August 10 Share Posted August 10 On 8/8/2024 at 4:05 AM, Mustberoz said: Hi there, Im having this same issue. I copied and pasted that code and found the URL for the image I'd like to use on mobile but unfortunately, nothing has changed. I also tried with the first set of code for the set fallback image and that didn't work as well. Would there be a setting/button i'm missing to make this work? Thank you! You need to change ID in the code. You can use this below tool. 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!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment