# Text-align: justify

**URL:** <https://forum.ghost.org/t/text-align-justify/15549>\
**Category:** Developer help\
**Created:** [July 2, 2020, 3:15am UTC](https://forum.ghost.org/t/text-align-justify/15549 "2020-07-02T03:15:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rolando](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/rolando/32/1826_2.png) [@rolando](https://forum.ghost.org/u/rolando)\
**Post date:** [July 2, 2020, 3:15am UTC](https://forum.ghost.org/t/text-align-justify/15549/1 "2020-07-02T03:15:03Z")

</div>

Is there a way to justify content on blog posts or do we need to hard code it on **.post-full-content**.CSS file?

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [July 2, 2020, 3:24am UTC](https://forum.ghost.org/t/text-align-justify/15549/2 "2020-07-02T03:24:48Z")

</div>

Yes it’s possible, supposing you’ve got `{{body_class}}` included in your `<body>` tag in your `default.hbs` file as such: `<body class="{{body_class}}">`. If that’s in place, all you have to do is add `.post-template` before the content that you specifically want to adjust. You’d therefore have something like this:

```auto
.post-template p {
    text-align: justify;
}

```

You can place that in your global code injection or your theme, up to you.

For more info on other templates you can use, see here:

> **[Ghost Handlebars Theme Helpers: body\_class](https://ghost.org/docs/themes/helpers/body_class/)**
>
> Learn how to target specific pages of your Ghost publication with styles. Read more about Ghost themes! 👻

---

<div class="post-metadata">

**Author:** ![Raclaw.ops](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/raclaw.ops/32/10623_2.png) [@Raclaw.ops](https://forum.ghost.org/u/Raclaw.ops)\
**Post date:** [December 4, 2020, 8:29pm UTC](https://forum.ghost.org/t/text-align-justify/15549/3 "2020-12-04T20:29:55Z")

</div>

You can also add the following to your `{{ghost_head}}` via the `code injection` menu in the ghost admin panel:

```auto
<style type="text/css">
.post-full-content
{
    text-align: justify;
}
</style>

```

Works perfectly for me.

---

<div class="post-metadata">

**Author:** ![noelboyd.com](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@noelboyd.com](https://forum.ghost.org/u/noelboyd.com)\
**Post date:** [July 18, 2021, 7:04am UTC](https://forum.ghost.org/t/text-align-justify/15549/4 "2021-07-18T07:04:38Z")

</div>

I’ve added this code in the Site Header but it doesn’t work. Is there anything else I can do?

[https://darkness.ghost.io/top-10-most-haunted-places-in-singapore/](https://darkness.ghost.io/top-10-most-haunted-places-in-singapore/)

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [July 21, 2021, 7:48am UTC](https://forum.ghost.org/t/text-align-justify/15549/5 "2021-07-21T07:48:07Z")

</div>

@noelboyd.com:

```auto
<style>
.post-template {
    text-align: justify;
}
</style>

```

---

<div class="post-metadata">

**Author:** ![noelboyd.com](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@noelboyd.com](https://forum.ghost.org/u/noelboyd.com)\
**Post date:** [July 21, 2021, 7:57am UTC](https://forum.ghost.org/t/text-align-justify/15549/6 "2021-07-21T07:57:34Z")

</div>

> [@Stromfeldt](#):
>
> ```auto
> <style>
> .post-template {
> text-align: justify;
> }
> </style>
> 
> ```

This worked! Thank you so much!!!

---

<div class="post-metadata">

**Author:** ![bastien](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bastien/32/40675_2.png) [@bastien](https://forum.ghost.org/u/bastien)\
**Post date:** [August 6, 2022, 3:37pm UTC](https://forum.ghost.org/t/text-align-justify/15549/7 "2022-08-06T15:37:27Z")

</div>

Thank you ! It also works for me but I would not like it to be applied to titles and excerpts. Is there a trick to only apply justify to main paragraphs ?

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [August 7, 2022, 6:15am UTC](https://forum.ghost.org/t/text-align-justify/15549/8 "2022-08-07T06:15:37Z")

</div>

That’d depend on your theme, but try the code I left in my first comment up top.

---

<div class="post-metadata">

**Author:** ![bastien](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bastien/32/40675_2.png) [@bastien](https://forum.ghost.org/u/bastien)\
**Post date:** [August 7, 2022, 8:39am UTC](https://forum.ghost.org/t/text-align-justify/15549/9 "2022-08-07T08:39:48Z")

</div>

Thank you !

Indeed with the code of your first comment the title is not justified anymore, which is good.  
But the excerpt just below the title and above the content is justified, and I would like to avoid it.  
My theme is «Journal», free theme in Ghost marketplace.

Would you have an idea of how I could avoid this excerpt to be justified ?

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [August 7, 2022, 9:15am UTC](https://forum.ghost.org/t/text-align-justify/15549/10 "2022-08-07T09:15:01Z")

</div>

This should do it:

```auto
.post-template .gh-content p {
    text-align: justify;
}

```

---

<div class="post-metadata">

**Author:** ![bastien](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bastien/32/40675_2.png) [@bastien](https://forum.ghost.org/u/bastien)\
**Post date:** [August 7, 2022, 9:41am UTC](https://forum.ghost.org/t/text-align-justify/15549/11 "2022-08-07T09:41:05Z")

</div>

indeed, it is working. thank you very much for your help.

---

<div class="post-metadata">

**Author:** ![bastien](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bastien/32/40675_2.png) [@bastien](https://forum.ghost.org/u/bastien)\
**Post date:** [August 8, 2022, 7:41pm UTC](https://forum.ghost.org/t/text-align-justify/15549/12 "2022-08-08T19:41:30Z")

</div>

@Stromfeldt I am sorry, I would also like to justify content from pages, with this code I only justify content from posts.  
Would you know what I should add ?

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [August 10, 2022, 6:53am UTC](https://forum.ghost.org/t/text-align-justify/15549/13 "2022-08-10T06:53:17Z")

</div>

Replicate the post portion but make it work for pages:

```auto
.post-template .gh-content p,
.page-template .gh-content p {
    text-align: justify;
}

```

---

<div class="post-metadata">

**Author:** ![bastien](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bastien/32/40675_2.png) [@bastien](https://forum.ghost.org/u/bastien)\
**Post date:** [August 10, 2022, 9:04am UTC](https://forum.ghost.org/t/text-align-justify/15549/14 "2022-08-10T09:04:08Z")

</div>

thank you very much it is perfectly working

---

<div class="post-metadata">

**Author:** ![bastien](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bastien/32/40675_2.png) [@bastien](https://forum.ghost.org/u/bastien)\
**Post date:** [August 10, 2022, 9:04am UTC](https://forum.ghost.org/t/text-align-justify/15549/15 "2022-08-10T09:04:51Z")

</div>

one question though : would it be better to integrate this in theme code or in code injection ? could it affect speed load ?

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [August 10, 2022, 9:28am UTC](https://forum.ghost.org/t/text-align-justify/15549/16 "2022-08-10T09:28:51Z")

</div>

I have no idea if it would affect speed load, but if it did it I imagine that it’d probably be so massively infinitesimal that you’d in effect lose something like 0.00000001 readers per month, less than you’d lose by not spell-checking your content.

Otherwise, if you already modify Journal for your personal usage then you might as well drop that code in. If not, then there’s probably no good reason lest you want to have to integrate updates into your modified theme as Journal gets updated every now and then (or to alternatively have to add those few lines back into Journal every time it gets updated).

---

<div class="post-metadata">

**Author:** ![bastien](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/bastien/32/40675_2.png) [@bastien](https://forum.ghost.org/u/bastien)\
**Post date:** [August 10, 2022, 11:03am UTC](https://forum.ghost.org/t/text-align-justify/15549/17 "2022-08-10T11:03:32Z")

</div>

thank you very much for these precisions

---

<div class="post-metadata">

**Author:** ![Syed\_Masir](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/syed_masir/32/28414_2.png) [@Syed\_Masir](https://forum.ghost.org/u/Syed_Masir)\
**Post date:** [January 17, 2024, 10:03am UTC](https://forum.ghost.org/t/text-align-justify/15549/18 "2024-01-17T10:03:57Z")

</div>

Can you help me add multilingual content to my site, I have content in urdu language and also in english but the problem is the Urdu is written right to left so for it I need right Alignment and English is written left to right so for it I need Left Alignment Can you help me do something like that where the text of Urdu Page is Shown with Right Alignment and Everything else is in left alignment

---

<div class="post-metadata">

**Author:** ![amaresh](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/amaresh/32/29741_2.png) [@amaresh](https://forum.ghost.org/u/amaresh)\
**Post date:** [April 4, 2024, 2:14am UTC](https://forum.ghost.org/t/text-align-justify/15549/19 "2024-04-04T02:14:26Z")

</div>

The provided code, when pasted into code injection, will justify all content except for the title.

```html
<style>
.post-template .gh-content p {
    text-align: justify;
}
.page-template .gh-content p {
    text-align: justify;
}
.tag-template .gh-content p {
    text-align: justify;
}
.author-template .gh-content p {
    text-align: justify;
}
</style>

```

---

<div class="post-metadata">

**Author:** ![Psychohistoria](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/psychohistoria/32/27892_2.png) [@Psychohistoria](https://forum.ghost.org/u/Psychohistoria)\
**Post date:** [September 3, 2024, 9:08pm UTC](https://forum.ghost.org/t/text-align-justify/15549/20 "2024-09-03T21:08:08Z")

</div>

Hi guys!

I used the code from this topic succesfullly, but have couple questions:

- how do I keep justify alignment in lists? It reverts back to left alignment, which looks ugly for big text block for each bullet point.
- can the title be left-adjusted, while excerpt is justified?
- mostly important - how do i translate this style to newsletter? After implementing the code successfully on this site, my newsletter still looks as before.

[Next page](https://forum.ghost.org/t/text-align-justify/15549.md?page=2)
