Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #978948

    Hello

    I have the header setting for the home page to be ‘invisible and appears on scroll down’. The first element on the page is a color section with a background image. However, when viewing on a mobile the header and top bar appear above the color section. How do I get the ‘Header is invisible and appears once user scrolls down’ to apply on mobile devices?

    Thanks

    #979646

    Hey yourcloudworks,
    Try this code in the General Styling > Quick CSS field or in WordPress > Customize > Additional CSS:

    @media only screen and (max-width: 767px) {
      .responsive #top #wrap_all #header {
        position: fixed !important; 
      }
    .responsive #top #wrap_all #header.av_header_transparency {
        display: none !important;
    }
    }

    If you feel that the header show too sharply and would like a little animation to have it fade in on scroll, try this code instead:

    @media only screen and (max-width: 767px) {
      .responsive #top #wrap_all #header {
        position: fixed !important; 
        -webkit-animation: fadein 1s; /* Safari, Chrome and Opera > 12.1 */
           -moz-animation: fadein 1s; /* Firefox < 16 */
            -ms-animation: fadein 1s; /* Internet Explorer */
             -o-animation: fadein 1s; /* Opera < 12.1 */
                animation: fadein 1s;
      }
    .responsive #top #wrap_all #header.av_header_transparency {
        display: none !important;
    }
    }
    @keyframes fadein {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
    
    /* Firefox < 16 */
    @-moz-keyframes fadein {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
    
    /* Safari, Chrome and Opera > 12.1 */
    @-webkit-keyframes fadein {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
    
    /* Internet Explorer */
    @-ms-keyframes fadein {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
    
    /* Opera < 12.1 */
    @-o-keyframes fadein {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    Best regards,
    Mike

    #980517

    Hello

    Thank you for this. I have applied the first suggested CSS, but the logo and menu bar has not changed on the homepage (on mobile). Are you able to take a look?

    Also only want this to apply to the homepage, as this CSS is creating a sticky header on all other mobile pages. This means that the logo and menu bar sits on top of the banner image.

    #980537

    Hello again. I have removed the CSS due to the issue described on the other pages.

    If you could suggest another way to make the menu/logo bar on the homepage (on mobile view) show only on scroll, without creating a sticky header , or having an affect, on other pages, that would be appreciated.

    #980880

    Hi,
    To have this only effect your homepage, you would need to add the page ID to the css rules, like this:

    @media only screen and (max-width: 767px) {
      .responsive #top.home #wrap_all #header {
        position: fixed !important; 
      }
    .responsive #top.home #wrap_all #header.av_header_transparency {
        display: none !important;
    }
    }

    Best regards,
    Mike

    #981488

    Hello, thank you for this. I have added it to the Quick CSS but it doesn’t appear to have made a difference to the home page, are you able to take a quick look please?

    #981783

    Hi,
    I have checked, and on the homepage the header shows only after scroll, just like the desktop view of the homepage, and this only happens on the homepage. On the other pages the header shows on page load and then moves up out of view on scroll.
    Please see screenshot in Private Content area.
    Is this what you wanted?

    Best regards,
    Mike

    #981970

    That has now taken effect, this is exactly what we were after, Thank you for all your help!

    #981999

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Header on mobile view’ is closed to new replies.