WordPress.org

Ready to get started?Download WordPress

Forums

How to center site title and tagline (4 posts)

  1. Leanne South
    Member
    Posted 9 months ago #

    http://www.bonnetsinwonderland.com

    request help centering site title and tagline. thank you.

  2. Rohan
    Member
    Posted 9 months 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 9 months ago #

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

  4. WPyogi
    Volunteer Moderator
    Posted 9 months 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;
        }
    }

Reply

You must log in to post.

About this Topic