sophie-a Posted March 20, 2023 Share Posted March 20, 2023 Hi! I need to modify the margins of the screen (left and right) on all pages on mobile only. I got help from @tuanphan. He provided me this code but it only modify the margins on the homepage. I need all pages. @media screen and (max-width:640px) { body.homepage .Index-page-content { margin-left: 50px !important; margin-right: 50px !important; } } Thank you!! Link to comment
Ziggy Posted March 20, 2023 Share Posted March 20, 2023 You'll want to remove this text from the code: .homepage 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
sophie-a Posted March 20, 2023 Author Share Posted March 20, 2023 It doesn't work. I've tried it. Link to comment
sophie-a Posted March 20, 2023 Author Share Posted March 20, 2023 This code works for the homepage but not for all other pages. @media screen and (max-width:640px) { body .Index-page-content { margin-left: 12px !important; margin-right: 12px !important; } } Link to comment
Ziggy Posted March 20, 2023 Share Posted March 20, 2023 Can you share your website URL? Where are you placing the code? 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
sophie-a Posted March 20, 2023 Author Share Posted March 20, 2023 My website url: https://sophie-a.com I place the code in the Design section / Custom CSS. See the screen shots (my Squarespace is in French). Link to comment
Ziggy Posted March 22, 2023 Share Posted March 22, 2023 Try this code instead: @media only screen and (max-width:640px) { .Index-page-content { margin-left: 12px !important; margin-right: 12px !important; } } I did also notice that you have an error in the CSS, lines 1 and 2 has a break after the comma, those selectors should be on the same line: 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment