WordPress.org

Forums

How to center site title and tagline (4 posts)

  1. Leanne South
    Member
    Posted 1 year ago #

    http://www.bonnetsinwonderland.com

    request help centering site title and tagline. thank you.

  2. iamrohan
    Inactive
    Posted 1 year ago #

    Hi,

    You will have to add following to your css:

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

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

  3. Leanne South
    Member
    Posted 1 year ago #

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

  4. WPyogi
    Forum Moderator
    Posted 1 year ago #

    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;
        }
    }

Topic Closed

This topic has been closed to new replies.

About this Topic