sophie-a Posted March 18, 2023 Share Posted March 18, 2023 Hi! I've made some modifications to my website on desktop and now on mobile, I don't like the margins (left and right). They are too small. See the screen shot. How can I increase them with CSS code? Only on mobile please. I'm on 7.0. My website: sophie-a.com. Thank you! Link to comment
tuanphan Posted March 19, 2023 Share Posted March 19, 2023 Add to Design > Custom CSS @media screen and (max-width:640px) { body.homepage .Index-page-content { margin-left: 50px !important; margin-right: 50px !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!) Link to comment
sophie-a Posted March 19, 2023 Author Share Posted March 19, 2023 Thank you so much!!! It works very well 😄 Link to comment
sophie-a Posted March 19, 2023 Author Share Posted March 19, 2023 Hi again!! 😉 Just realized that the margins have been modified only on the homepage. How can I change the margins on all pages? Link to comment
tuanphan Posted March 21, 2023 Share Posted March 21, 2023 On 3/19/2023 at 6:07 PM, sophie-a said: Hi again!! 😉 Just realized that the margins have been modified only on the homepage. How can I change the margins on all pages? remove this body.homepage 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
sophie-a Posted March 21, 2023 Author Share Posted March 21, 2023 I tried it but it didn't work 😞 The code: @media screen and (max-width:640px) { .Index-page-content { margin-left: 12px !important; margin-right: 12px !important; } } Link to comment
tuanphan Posted March 25, 2023 Share Posted March 25, 2023 Try this new code @media screen and (max-width:640px) { .Index-page-content { margin-left: 12px !important; margin-right: 12px !important; } .Main-content { padding-left: 5px !important; padding-right: 5px !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!) 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