Viewing 11 replies - 1 through 11 (of 11 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Hi Ben, this is the design of the theme. What are your expectations specifically, how much of the image should be shown and at which device size and page?

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hello benni0307,

    Navigate Additional CSS option and put below css into textarea then click on Save & Publish button.


    .custom-header {
    height: 870px;
    }
    @media only screen and (max-width:768px) {
    .custom-header {
    height: 400px;
    }
    }
    @media only screen and (max-width:480px) {
    .custom-header {
    height: 200px;
    }
    }

    If there no Additional CSS option or not work then put css code into you current active theme’s style.css file located at wp-content/themes/your_current_theme/ folder.

    Note : All Changes you done in any file of theme are gone when you update theme. So prefer Child Theme.

    Hope this will helps you.

    Thread Starter benni0307

    (@benni0307)

    Thx Add Web Solution,

    that’s great ?? – now the header are shown correctly.

    last question, is there any possibility that you remove the right space on mobile phone. On my mobile i can scroll to the right and see a big empty area.

    Thanks in Advance,

    Ben

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hello benni0307,

    Find <meta name=”viewport” content=”width=device-width, initial-scale=1″> line into header.php located at wp-content/themes/your_current_theme/ folder and replace it with below line.

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    Note : All Changes you done in any file of theme are gone when you update theme. So prefer Child Theme.

    Hope this will helps you.

    Thread Starter benni0307

    (@benni0307)

    Thanks that worked ?? … you are amazing man

    Hello @addweb-solution-pvt-ltd ,
    Thank you a lot,the header image of ‘twenty seventeen’ theme is working in mobile phones.But when I am adding the video on the header area, it is not working on mobile.If anyone can help me on these that will be great, it will be great to watch running header video on my mobile phone instead of image.Thanks everyone.

    I have a problem with header image too. I loaded a new image (2000px x 1200px, as recommended by theme). The image shown is cut off. It only shows the bottom part (height about 300px) I restored it to the default image. It still shows the cut-off image. Why it does not work correctly even I load the default header image?

    Hi Michael, sorry my issue is with different browsers (IE, Chrome) zooming at different levels.

    My mobile site has always worked well

    Thom

    Hi Thom,

    thanks for answering, glad your site is working well.

    For anyone interested, found the answer for my problem in this thread -> https://www.ads-software.com/support/topic/mobile-header-image-doesnt-resizeunresponsive/ -> credits to @anevins.

    Michael

    I added this code and it’s not changing the mobile size. Any other options?

    Hello @socialdzine,

    this worked for me:

    Child theme header:

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    Child theme style.css:

    @media screen and (max-width: 1280px) {
        .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: auto;
            left: 0;
            max-width: 100%;
            min-height: 0;
            -o-object-fit: unset;
            object-fit: unset;
            position: relative;
            -ms-transform: none;
            -moz-transform: none;
            -webkit-transform: none;
            transform: none;
        }
    }
    
    @media screen and (max-width: 1024px) {
        .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: auto;
            left: 0;
            max-width: 100%;
            min-height: 0;
            -o-object-fit: unset;
            object-fit: unset;
            position: relative;
            -ms-transform: none;
            -moz-transform: none;
            -webkit-transform: none;
            transform: none;
        }
    }
    
    @media screen and (max-width: 768px) {
        .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: auto;
            left: 0;
            max-width: 100%;
            min-height: 0;
            -o-object-fit: unset;
            object-fit: unset;
            position: relative;
            -ms-transform: none;
            -moz-transform: none;
            -webkit-transform: none;
            transform: none;
        }
    }
    
    @media screen and (max-width: 480px) {
        .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: auto;
            left: 0;
            max-width: 100%;
            min-height: 0;
            -o-object-fit: unset;
            object-fit: unset;
            position: relative;
            -ms-transform: none;
            -moz-transform: none;
            -webkit-transform: none;
            transform: none;
        }
    }

    Looks clumsy but works.
    Michael

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Twenty Seventeen Header Image not shown correct’ is closed to new replies.