Jump to content

Reduce padding on mobile

Go to solution Solved by Ziggy,

Recommended Posts

Hi All

In the process of building out a homepage and I'm struggling with something I think should be pretty straight forward. I want to be able to control padding of each section on mobile.

I've tried various found code and pasted into css but clearly doing something wrong...

So the first section I would like to adjust is labelled:
section[data-section-id="65b90c8f6fb984655e213dbe"]

Second section is 
section[data-section-id="66340409d7dea276bd80b731"]

I've attached pics to show to show spacing I'm trying to adjust. Any help would be greatly appreciated.

Thanks
 

Screenshot 2024-05-08 at 16.36.32 copy.png

Screenshot 2024-05-08 at 16.36.32 copy.png

Link to comment
  • Replies 5
  • Views 228
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Can you share your website URL?

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) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

The section sizes S M L come with different inbuilt padding linked to the screen width, but you can control it in CSS like this:

section[data-section-id="65b90c8f6fb984655e213dbe"] {
  .content-wrapper {
    margin-top:42px;
    margin-bottom:42px;
  }
}

Or you can target just mobile like this:

@media only screen and (max-width:767px) {
  section[data-section-id="65b90c8f6fb984655e213dbe"] {
    .content-wrapper {
      margin-top:42px;
      margin-bottom:42px;
    }
  }
}

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) 

 Did I help? Buy me a coffee?

Link to comment
1 hour ago, Inkdave said:

All sorted. Many thanks for the lesson

Happy to help

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) 

 Did I help? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.