Change Header Image Size of 2017 Twenty Seventeen Theme

Last updated on June 26th, 2022 at 11:41 am

The Twenty Seventeen theme comes with a very high header by default which takes a significant amount of space on the pages of your site.

Luckily, thereā€™s a solution to reduce Twenty Seventeenā€™s header height with a couple of CSS code snippets that you can add to your theme. Here’s an example of a reduced header height in Twenty Seventeen.

If you donā€™t use a picture of a specific size in your header, this guide will help you reduce the blank space in the header area of your theme.

In fact, the same code snippets can be used for making Twenty Seventeenā€™s header even bigger. You just need to play with the numbers in the CSS code until you get the result you need. Hereā€™s what to do.

Reduce or increase Twenty Seventeenā€™s Header Height

1. Log in to your WP Dashboard and go to Appearance > Customize > Additional CSS.

2. Paste the code snippets that follow below and click on the Save & Publish button to save the new settings.

Change the header height of Twenty Seventeen for common computer screens

3. Note that by using this code the change of the headerā€™s height will be valid only for regular desktop/laptop screens.

/* Use this CSS code snippet to modify headerā€™s height for regular desktop or laptop screens */
@media screen and (min-width: 48em) {
.site-branding {
padding: 1px 0;
}

To further optimize the headerā€™s height for mobile devices, add the code snippet from the steps that follow.

Change header’s height of Twenty Seventeen for mobile devices, smartphones and tablets

4. The following code snippet can be used for changing the headerā€™s height for mobile screens such as smartphones and tablets only.

/* Change the headerā€™s height for smartphones and tablets */
.site-branding {
padding: 1px 0;
}

Use both code snippets to permanently change the headerā€™s height for Twenty Seventeen

Paste the two CSS codes one after another in the Additional CSS section of your Twenty Seventeen theme and save the changes to check the results.

Author: wpbackend

Content creator at wpbackend.com

2 thoughts on “Change Header Image Size of 2017 Twenty Seventeen Theme”

    1. Hi Helen. Thanks for your feedback. Please note that the code provided in the article is for changing the position of the title of the site.

      If you need to change the site logo of your Twenty Seventeen 2017 WordPress theme, use the following code:

      .custom-logo {
      height: 100px;
      width: 100px;
      }

      In order to change the dimensions of the Twenty Seventeen 2017 site header on the home page of your site, use the following code:

      .site-header {
      margin-top: -100px;
      }

      To change the dimentions of the image of the Twenty Seventeen 2017 site header on the home page of your site, use the following code:

      .twentyseventeen-front-page.has-header-image .custom-header-image {
      height: 120px;
      height: 100px;
      height: 50px;
      max-height: 100%;
      overflow: hidden;
      }

      Let me know if there’s anything else I can help with. Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *