Jump to content

How to adjust the width of a whole section that is not full width?

Go to solution Solved by Lesum,

Recommended Posts

Is there a way to adjust the width of a specific section?

The current section is the widest it can go without stretching it to full width. I need CSS to be able to add more width to the section at my control. And with the ability to adjust it slightly for mobile too.

Current position attached and an ideal example.

 

Screenshot 2023-09-17 at 10.39.27.png

Screenshot 2023-09-13 at 22.17.30.png

Screenshot 2023-09-17 at 10.43.40.png

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

@johnpaulstuthridge You can add this code snippet within the Custom CSS panel. Code will transform the width of the section to 100% of the page width. 

section[data-section-id="6504b8da0d80e56321e7e41e"] {
  .fluid-engine {
    --sqs-site-max-width:100vw;
    --sqs-site-gutter:0vw;
  }
}

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment
1 hour ago, Lesum said:

@johnpaulstuthridge You can add this code snippet within the Custom CSS panel. Code will transform the width of the section to 100% of the page width. 

section[data-section-id="6504b8da0d80e56321e7e41e"] {
  .fluid-engine {
    --sqs-site-max-width:100vw;
    --sqs-site-gutter:0vw;
  }
}

Hey that works great! However it's made the margins slightly smaller for mobile for some reason. It would be great if it left mobile as the default margins, just coded for desktop only. Is that possible?

Link to comment
  • Solution

@johnpaulstuthridge Sure. Remove the previous code and add the code below:

@media only screen and (min-width: 768px) {
	section[data-section-id="6504b8da0d80e56321e7e41e"] {
  		.fluid-engine {
    		--sqs-site-max-width:100vw;
    		--sqs-site-gutter:0vw;
  		}
	}
}

 

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? 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.