WordPress.org

Support

Support » How-To and Troubleshooting » How to center site title and tagline

How to center site title and tagline

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    You will have to add following to your css:

    .site-header h1{
    text-align:center !important;
    }

    .site-header h2{
    text-align:center !important;
    }

    Thank you, Rohan.
    Can you direct me to the CSS for this page?

    WPyogi

    @wpyogi

    Forum Moderator

    You should not be modifying any theme files – as those changes will be lost when WP is updated. Use a child theme or custom CSS plugin to make changes. Looks like you have JetPack, so you can use Edit CSS to ADD CSS changes there.

    Also, you should not need to use !important for something like this – it should only be used as a very last resort.

    Try adding this CSS to your custom CSS:

    @media screen and (min-width: 600px) {
    
        .site-header h1, .site-header h2 {
              text-align: center;
        }
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to center site title and tagline’ is closed to new replies.