Jump to content

Line spacing in blog posts

Recommended Posts

Site URL: https://www.sheppardranbom.com/blog/the-opening-of-a-play-love-suicide-at-takayama

Working on a site for a friend.  He wants to post poems in blog posts like on this page.  Would like to make just this section of the post single spaced with less padding (and ideally have the speaker name to the left of their text--like a table).  Do I need to put in custom code and, if so, can I apply it to just a section of individual blog posts?  Thanks!

Link to comment
  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hello!

To achieve this, you would need to have some basic understanding of HTML, and you'll also need to have at least a Squarespace business plan so that you can access code blocks.

First, add a code block where you want to include the poem. Then, Copy and paste the below snippet as a template for the poem, and modify the text. Lastly, copy and paste the CSS code snippet in Custom CSS and change the line-height and margin-left properties as needed. The <br> elements are line breaks, so just add those wherever you want the line breaks to occur. You can add this code snippet to any code block on your site and it should fix the styling.

HTML

<p class="poem-excerpt">
  
Ah youth.  Can you remember?
<br>
A time when our passion was so large
<br>
we thought that we could live on it,
<br>
as poor artists thrive on the dreams 
<br>
they paint and live on winkles. 
  
</p>

CSS

//Start: Poem Excerpt Styling
  .poem-excerpt {
    line-height: 3;
    margin-left: 40px;
  }
//End: Poem Excerpt Styling
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.