Marta Posted September 27, 2022 Share Posted September 27, 2022 Site URL: https://www.martaraptis.com/ Hello, I have a banner image that looks good on my laptop but terrible on mobile. Can someone please help me reduce the size of it so it fits nicely on mobile? thanks so much Link to comment
Ziggy Posted September 28, 2022 Share Posted September 28, 2022 Hi @Marta, this is a pretty common design challenge for any website with background images. Background images are set to fill a space on your website defined by the foreground content in the section, usually a minimum height and the screen size that the website is being viewed on. With this in mind and the fact that your background image needs to look good as a letterbox ratio of may 3:1 on a very wide screen, as a square (1:1) on tablet screen, and a portrait image (1:3) it is often good to pick an image that will look good when cropped in these ways and every way in between. Not to say this is necessarily easy! Here are two possible solutions depending on how you'd prefer to solve this. 1: Replace the background image for a completely different one on mobile: 2: Prevent the background image from being cropped no matter what the screen size:https://www.will-myers.com/articles/prevent-background-images-from-cropping-in-squarespace-71 This is potentially a good solution, but any content that you have in the section will potentially stop this from working. I hope this helps you towards a solution that works for you. tuanphan 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
tuanphan Posted September 30, 2022 Share Posted September 30, 2022 You can also try this code to Design > Custom CSS /* Mobile top banner */ @media screen and (max-width:767px) { body.homepage .Parallax-item:first-child img { width: 100% !important; left: 0 !important; height: auto !important; top: 10px !important; } section#home-banner { height: 300px; } } 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
Marta Posted October 1, 2022 Author Share Posted October 1, 2022 On 9/29/2022 at 10:22 PM, tuanphan said: You can also try this code to Design > Custom CSS /* Mobile top banner */ @media screen and (max-width:767px) { body.homepage .Parallax-item:first-child img { width: 100% !important; left: 0 !important; height: auto !important; top: 10px !important; } section#home-banner { height: 300px; } } @tuanphan thanks for the code, it's quite close! However, now I'm getting a black background behind my main tagline, and the tagline also gets cut off. See attached screenshot. Any ideas to fix that? thanks so much! Link to comment
tuanphan Posted October 3, 2022 Share Posted October 3, 2022 On 10/2/2022 at 3:55 AM, Marta said: @tuanphan thanks for the code, it's quite close! However, now I'm getting a black background behind my main tagline, and the tagline also gets cut off. See attached screenshot. Any ideas to fix that? thanks so much! Try this new code /* Mobile top banner */ @media screen and (max-width:767px) { body.homepage .Parallax-item:first-child img { width: 100% !important; left: 0 !important; height: auto !important; top: 10px !important; } section#home-banner { height: 180px; } div#block-yui_3_17_2_1_1655215461081_2516 { display: none; } div#page-62a74b005d5db60eca5fa90d { position: relative; top: -60px; } } Marta 1 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