TomBatch Posted October 28, 2022 Share Posted October 28, 2022 Hey Folks, I am trying to make two images on my homepage appear as one image. 'As seen on feature'. So that in mobile they stack. I have added some custom CSS code to change the padding to -20px on the left and right side of the two images. But then in mobile view the whole padding of screen is out and makes the page bigger than the screen. Any ideas how I adjust the left and right padding on desktop and then top and bottom on mobile? Here is the page - https://www.batchcoffee.co.uk/home-1 Thanks in advance 🙂 Link to comment
Ziggy Posted October 28, 2022 Share Posted October 28, 2022 Put desktop padding inside this media query: @media only screen and (min-width:768px) { //in here - replace this line// } and mobile padding inside here: @media only screen and (max-width:767px) { //in here - replace this line// } Note: min-width and max-width will affect desktop and mobile respectively. You may want to tweak the padding to use 17px instead of 20px (17px is the standard block padding on SQSP) 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) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
TomBatch Posted October 28, 2022 Author Share Posted October 28, 2022 Thanks mate. Just to confirm. what goes in here //in this line//? And is this in CSS or in the header of the page? Link to comment
Ziggy Posted October 28, 2022 Share Posted October 28, 2022 It's CSS, same as the padding. Put the lines of custom CSS within the media query. Something like this: @media only screen and (min-width:768px) { #block-yui_3_17_2_1_1666941998979_1830 { padding:-17px; } } If you can provide the padding CSS that you've added I might be able to adjust if for you. 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) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
TomBatch Posted October 28, 2022 Author Share Posted October 28, 2022 Topman. This is what I have so far: #block-yui_3_17_2_1_1666941010634_110861 {margin-top:-40px; margin-right: -17px; margin-bottom:-40px; z-index:99;} #block-yui_3_17_2_1_1666941010634_113072 {margin-top:-40px; margin-left: -17px; margin-bottom:-40px; z-index:99;} Link to comment
Ziggy Posted October 28, 2022 Share Posted October 28, 2022 I've split up your Custom CSS to have just the left/right affecting desktop, and the top/bottom just affecting mobile. Hopefully you can see what I've done, and adjust it to work for you. Let me know if this works, give me a thumbs up if it does! // Desktop @media only screen and (min-width:768px) { #block-yui_3_17_2_1_1666941010634_110861 { margin-right: -17px; z-index:99; } #block-yui_3_17_2_1_1666941010634_113072 { margin-left: -17px; z-index:99; } } // Mobile @media only screen and (max-width:768px) { #block-yui_3_17_2_1_1666941010634_110861 { margin-top:-40px; margin-bottom:-40px; z-index:99; } #block-yui_3_17_2_1_1666941010634_113072 { margin-top:-40px; margin-bottom:-40px; z-index:99; } } TomBatch 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) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
TomBatch Posted October 28, 2022 Author Share Posted October 28, 2022 Thank you so much! 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