From 7756f9aad39292316cc7fe5d5a3704c292cd364d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 10 Apr 2018 15:12:57 -0400 Subject: [PATCH] fixing header images from getting crunched header interior images are getting distorted when changing viewports --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index f894de7..2721952 100644 --- a/functions.php +++ b/functions.php @@ -101,7 +101,7 @@ function glm_get_header() { if (has_post_thumbnail() && (!(is_home()) ) && (!(is_single())) && (!(is_archive())) && (!(is_search()))) { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); - echo ' style="background-image: url('.$image_data[0].');padding:0;padding-bottom:400px;background-position:center center;background-size: 100% 100%;background-repeat:no-repeat;max-height: 400px; "'; + echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 420px;min-height: 150px; "'; } else if ( is_post_type( 'post' ) ) { echo ' style="background-image: url('.get_template_directory_uri().'/assets/blog-featured.jpg);height:400px;padding:0;padding-bottom:400px;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 400px;"'; } else { -- 2.17.1