Jump to content

Define firm left margin for content in a section

Go to solution Solved by Beyondspace,

Recommended Posts

Posted

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

  • Solution
Posted
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;
} 

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Posted

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

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

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.