Jump to content

Reduce spacing after heading and between paragraph breaks – hard returns

Recommended Posts

Is there any way to reduce the spacing of a hard return after a heading? Is there also a way to reduce the size of empty space between paragraphs when you use a double hard return?

Squarespace has implemented some super frustrating code that creates a massive space after every hard return / paragraph break. Is there anyway to turn this off, or alter the code to only apply after a double hard return, like standard word editors?

It's seriously impacting readability in text heavy areas like Blogs or Policy pages, that need paragraph headers to outline ideas or  visually break up the content.

Link to comment

Can you share your website URL? As well as examples?

It sounds like you need to reduce the margins after the headings, I can help you reduce that site-wide with a little CSS.

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!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

It looks like the margin on that is already set to 0em

 

image.png.9710dccf5600ddb14703c68849705a41.png

Edited by Ziggy

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!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
On 1/26/2023 at 2:48 AM, Ziggy said:

Can you share your website URL? As well as examples?

It sounds like you need to reduce the margins after the headings, I can help you reduce that site-wide with a little CSS.

Hi @Ziggy 

This is the page I've been testing code / paragraph format on:
https://beehyve.squarespace.com/test-page
password: abc


I figured out how to adjust the margins to decrease the space between headers and paragraphs. Unfortunately the reduced margin made proper paragraph breaks too small, but a double hard return was still too big. I've been trying to find a way to target just the empty spaces between text but keep coming up against issues.


The below code is what I've come up with so far but I've already noticed it's not working with summary blocks.  Would you have any ideas on how to improve this or a different solution that may work better? 

Thanks so much!

h1, h2, h3{ 
  margin-bottom: .7rem!important;
  margin-top: 0!important;}

h4, .sqsrte-large , p, .sqsrte-small, ul, li, ol{
  margin-bottom: 0.3rem;
  margin-top: 0.0rem;
}

.list-item-content :empty, .sqs-block-html .sqs-block-content *:empty{
margin: 0!important;
 height:1rem!important;
}

 

Link to comment
7 hours ago, melaniejaane said:

not working with summary blocks

It looks like you have blank paragraph spacing on the summary blocks which is where the excess spacing is coming from. It looks like you're using this in many places. I'm not sure what you're trying to achieve by using code to get rid of the space and adding it back with blank paragraphs in between text?

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!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
16 hours ago, Ziggy said:

It looks like you have blank paragraph spacing on the summary blocks which is where the excess spacing is coming from. It looks like you're using this in many places. I'm not sure what you're trying to achieve by using code to get rid of the space and adding it back with blank paragraphs in between text?

Hey @Ziggy

I've attached screenshots of before and after targeting the blanks spaces to hopefully show what I'm trying to achieve.

When I reduced the text margins, I needed a double hard return to make a visible paragraph break. However instead of the original 1rem margin break, the paragraph breaks became full text-line-height + reduced margins stacked on both sides. So I'm trying to globally target the empty spaces, to make standard looking paragraph breaks while also keeping reduced margins between different text styles.

I'm just struggling to find a code that targets all empty spaces between text without also impacting other elements. Would you have any ideas? Thanks again! 🙂 

Targeting Text and Blank Spaces.png

Targeting Text Only.png

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.