Jump to content

How to Apply Fixed Margins

Recommended Posts

Hello, 

I am trying to lock my SquareSpace site's margins and width so they stay fixed to one size, no matter the browser window/monitor size. An example of the type of locked margins I am hoping to apply to my site can be found here

Is there a way to achieve that using SquareSpace design elements or through CSS?

 

Thank you in advance for your help. 

Link to comment
7 hours ago, jairobrito805 said:

Hello, 

I am trying to lock my SquareSpace site's margins and width so they stay fixed to one size, no matter the browser window/monitor size. An example of the type of locked margins I am hoping to apply to my site can be found here

Is there a way to achieve that using SquareSpace design elements or through CSS?

 

Thank you in advance for your help. 

Do you mean setting the these spaces with the same value on desktop and mobile view?

image.thumb.png.86f2cf64edb5fffed195ee0ce35ded0d.png

Press 👍  or mark my comment as solution if you find my sharing useful

🆒 Squarespace pinchzoom lightbox plugin (affiliate link)

👁‍🗨 360 degree photo viewer (affiliate link)

Link to comment

@jairobrito805 use this code  website > Pages > Websites Tools > Custom Css

#page {
    max-width: 1392px;
    margin-left: auto;
    margin-right: auto;
}

/* Optional: To set fixed margins */
body {
    padding-left: 20px; /* Adjust left padding */
    padding-right: 20px; /* Adjust right padding */
}

 

Edited by LoftyDevsbyWidleStudioLLP

LoftyDevs - Squarespace Website Design Experts

email.png
Connect - info@loftydevs.com 
website.png
Website - loftydevs.com
address.png
Ahmedabad, India
 
 
 
 
Link to comment
  • 2 weeks later...
On 7/17/2024 at 1:02 AM, LoftyDevs-Squarespace said:

@jairobrito805 use this code  website > Pages > Websites Tools > Custom Css

#page {
    max-width: 1392px;
    margin-left: auto;
    margin-right: auto;
}

/* Optional: To set fixed margins */
body {
    padding-left: 20px; /* Adjust left padding */
    padding-right: 20px; /* Adjust right padding */
}

 

This worked, but only for the body of the page. The header still stretches past the 1392px value. Is it possible to lock the header to that width as well?

 

Thank you for your help and apologies for the late response. 

Link to comment
On 7/16/2024 at 11:11 PM, HoaLT said:

Do you mean setting the these spaces with the same value on desktop and mobile view?

image.thumb.png.86f2cf64edb5fffed195ee0ce35ded0d.png

Hi, apologies for the late response. I am primarily concerned with keeping the margins locked on desktop. 

Thank you for your response. 

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.