Skip to content

Instantly share code, notes, and snippets.

@jimmyk69
Created May 19, 2017 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmyk69/a3f6a66c7ff7a8f79d93aa209a8c16d7 to your computer and use it in GitHub Desktop.
Save jimmyk69/a3f6a66c7ff7a8f79d93aa209a8c16d7 to your computer and use it in GitHub Desktop.
.has-header-image .custom-header-media img, .has-header-video .custom-header-media video, .has-header-video .custom-header-media iframe, .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img {
height: 66% !important;
object-fit: fill !important;
width: 100%;
max-height: 100% !important;
display: block !important;
position: relative !important;
}
#wp-custom-header {
height: 50% !important;
}
.admin-bar.twentyseventeen-front-page.has-header-image .custom-header-media, .admin-bar.twentyseventeen-front-page.has-header-video .custom-header-media, .admin-bar.home.blog.has-header-image .custom-header-media, .admin-bar.home.blog.has-header-video .custom-header-media {
height: calc(71vh – 32px) !important;
}
@borosbence
Copy link

Hi!

It seems that if I insert it to the Custom CSS part your code is not working well.

wp27css

I suggest the following method:

.has-header-image.twentyseventeen-front-page .custom-header, .has-header-video.twentyseventeen-front-page .custom-header, .has-header-image.home.blog .custom-header, .has-header-video.home.blog .custom-header
{
	height: 400px;
}

Works well on mobile and PC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment