From: Anthony Talarico Date: Tue, 10 Apr 2018 19:12:57 +0000 (-0400) Subject: fixing header images from getting crunched X-Git-Tag: v1.0.0^2~47 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=7756f9aad39292316cc7fe5d5a3704c292cd364d;p=WP-Themes%2Fdiscoverkalamazoo2018.git fixing header images from getting crunched header interior images are getting distorted when changing viewports --- 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 {