How to center text?


#1

Hi,

How can I center text in this post?

I expected to see an option in the formatting bar the appears when the text is highlighted. It’s not there though.

Thanks!

P.S. - I searched forum for “center text” and didn’t find an answer.


#2

Hey there!

In my opinion, you have multiple options to center your text, depending on what you’d like to achieve:

  1. When all your posts should always be centred: that should be solved on a theme level by adjusting the CSS for your theme → https://docs.ghost.org/api/handlebars-themes/

  2. If this is a one-off thing: either use codeinjection for the post to overwrite/adjust the existing CSS (article {text-align: center;} for example), or use HTML card in the editor, where you can add inline style for the paragraphs you’d like to have centred (<div style="text-align:center;">I have a text here and it needs to be centred!</div>)

Hope that helps!


#3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.