Jump to content

How to justify paragraph text right and left

Recommended Posts

The css property you're using is correct. the issue will be how you target the paragraphs you want to justify. if squarespace already has a text-align code put in for that piece of content (from a more specific rule) your css code won't apply without !important being added.

I'd question whether you want this effect for the whole site, many of the section blocks in summaries etc are way too small for this effect to be a good decision.

Anyway, if you want to do it for the whole site something like this added to your custom css will do it

p { text-align: justify !important }

I'd probably suggest that you try to target certain items more specifically. 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Link to comment
  • 3 weeks later...

@libertine

OK, you just need to find a way to target only the about page. One way to do this is to find the section id and use that in a CSS rule that you paste into your Custom CSS. The easiest way to find the section id is using the Squarespace ID Finder chrome extension.

For your about section the id is "60e3ad8978955f711e766495", so all you need to do is take the code from above and prefix it with a rule to target only this id. it looks like this

// justifies paragraphs in the "about" section
section[data-section-id="60e3ad8978955f711e766495"] p { 
	text-align:justify; 
}

add this to your custom CSS (in the main design menu). because this is a more specific rule than Squarespace's global text align rule you don't need !important here as I posted in my answer above.

As a footnote I would add that I don't think justifying text is a very "web" thing to do. it tends to be something you do to reinforce the idea/shape of columns of text. that said, I understand it's a client choice.

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Link to comment
  • 4 weeks later...
On 10/8/2021 at 4:45 AM, iamdavehart said:

@libertine

OK, you just need to find a way to target only the about page. One way to do this is to find the section id and use that in a CSS rule that you paste into your Custom CSS. The easiest way to find the section id is using the Squarespace ID Finder chrome extension.

For your about section the id is "60e3ad8978955f711e766495", so all you need to do is take the code from above and prefix it with a rule to target only this id. it looks like this

// justifies paragraphs in the "about" section
section[data-section-id="60e3ad8978955f711e766495"] p { 
	text-align:justify; 
}

add this to your custom CSS (in the main design menu). because this is a more specific rule than Squarespace's global text align rule you don't need !important here as I posted in my answer above.

As a footnote I would add that I don't think justifying text is a very "web" thing to do. it tends to be something you do to reinforce the idea/shape of columns of text. that said, I understand it's a client choice.

Hello thank you very much for your help.

I entered this in but no effect.  Any thoughts?

Link to comment
On 10/8/2021 at 7:16 AM, libertine said:

Hello i am having an extremely tough and confused time with this whole justify thing, and my client really wants it.

Im interested in how to set it to globally be justified for body text.

But she is only most interested in justifying the text on the About page.

https://harmonica-denim-49s7.squarespace.com/

password: gelis

Thank you!

It looks already justify here

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
On 10/8/2021 at 9:45 PM, iamdavehart said:

@libertine

OK, you just need to find a way to target only the about page. One way to do this is to find the section id and use that in a CSS rule that you paste into your Custom CSS. The easiest way to find the section id is using the Squarespace ID Finder chrome extension.

For your about section the id is "60e3ad8978955f711e766495", so all you need to do is take the code from above and prefix it with a rule to target only this id. it looks like this

// justifies paragraphs in the "about" section
section[data-section-id="60e3ad8978955f711e766495"] p { 
	text-align:justify; 
}

add this to your custom CSS (in the main design menu). because this is a more specific rule than Squarespace's global text align rule you don't need !important here as I posted in my answer above.

As a footnote I would add that I don't think justifying text is a very "web" thing to do. it tends to be something you do to reinforce the idea/shape of columns of text. that said, I understand it's a client choice.

Thank you for this!

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.