How do I automatically center the title of a post?

  • Author
    Posts
  • #15086
    Matt M

    I’m new to WordPress, but I’ve searched for the answer to this question all over the web with no luck. Is there a way to automatically center the title of a post without manually adding code? From what I read this can only be accomplished by adding code to the StyleSheet, but I prefer not to add code unless I have to. I’ve read on the forum here that when you manually add code it gets lost when you update the theme unless I’m misunderstanding where to place the code.

    If the code does have to be added manually is this the proper code to use?

    h1 {
    text-align: center;
    }

    I also have a question about indentation, because I want my blog posts to be indented, but not my poetry posts (these are on a different page). This also requires code from what I’ve read, if that is correct, is this the proper code?

    After you’re finished with a post, switch to the Text Editor and put the below code in a line before all of the paragraphs you want indented:
    <div style=”text-indent:20px;”>

    Then at the very bottom, make a new blank line below all your text and put this on that line.
    </div>

    #15815
    Zed
    Cryout Creations mastermind

    You can place any CSS you may want to use to change how your site looks in the Custom CSS field (under Miscellaneous in the theme’s settings page). This CSS is saved separately and is applied to the entire site without editing any files.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How do I automatically center the title of a post?’ is closed to new replies.