Jump to content

Define firm left margin for content in a section

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: https://susie-gregory-21.squarespace.com

I'm trying to force the text in a particular section to stay left (with a margin of 50px) as the screen size changes. That is, in the image attached, I want that left-hand orange area to stay at 50px rather than adjusting to centre the text block on the page. I can do this with CSS by applying a margin-left tag to the content wrapper, however the content wrapper's ID is a #yui, not a #block-yui, so it changes all the time.

Any ideas on how I can target the content wrapper in a way that will stay fixed? Or other ways to achieve the same end.  (What we are aiming to do is stop the text from 'drifting' onto the rocks on large screens.)

(Password to see the site is 'alice')

Healthy Outlook 2022-02-08 14-10-21.jpg

Link to comment
  • Solution
2 hours ago, davidbrewster said:

Site URL: https://susie-gregory-21.squarespace.com

I'm trying to force the text in a particular section to stay left (with a margin of 50px) as the screen size changes. That is, in the image attached, I want that left-hand orange area to stay at 50px rather than adjusting to centre the text block on the page. I can do this with CSS by applying a margin-left tag to the content wrapper, however the content wrapper's ID is a #yui, not a #block-yui, so it changes all the time.

Any ideas on how I can target the content wrapper in a way that will stay fixed? Or other ways to achieve the same end.  (What we are aiming to do is stop the text from 'drifting' onto the rocks on large screens.)

(Password to see the site is 'alice')

Healthy Outlook 2022-02-08 14-10-21.jpg

Try adding to Home > Design > Custom Css

section[data-section-id="61a5b35dcb3aea5591e942dc"] .content-wrapper {
  margin: 0 50px !important;
} 

 

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

You can use the extension - Squarespace ID Finder

Here is how to get the appropriate id: https://recordit.co/Aj9vXw6rfY

Hope that it makes sense

 

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

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.