Okay
  Public Ticket #2841778
Enable "Header Hide Until Needed" for Logo but not for Menu button
Closed

Comments

  •  23
    alberteck started the conversation

    Hey

    Hope you guys are doing well!

    How can I have "Header Hide Until Needed" applied only to the Logo and not to the Menu button?

    Such that when I scroll down, the logo hides itself but the menu button remains still, and when I do scroll up, the menu button remains visible but the logo shows itself

    Thanks

  •   alberteck replied privately
  •  8,939
    Tahir replied

    Hey Again,

    Add this into the Custom CSS box in your Salient Theme Options panel (We write all Custom CSS in the Live Browser to ensure accuracy. If you cannot see any changes, make sure there is no red cross in the Custom CSS Box as any syntax error would cause all CSS under that line of code to not show up on the Frontend):

    div#header-outer.invisible:not(.at-top) .col.span_9 {
        transform: translateY(100%);
    }

    Thanks


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Hey Tahir!

    Thanks for the quick response!

    I tried the script you sent, however, there is a weird jumping animation everytime we change the scroll direction from up to down or down to up..

    Could you please check the link again?

    I am trying to make it something like this: https://www.brucira.com/

    Where the contact button hides but the menu button remains still

  •  8,939
    Tahir replied

    Hey Again,

    Use this revised CSS.

    Add this into the Custom CSS box in your Salient Theme Options panel (We write all Custom CSS in the Live Browser to ensure accuracy. If you cannot see any changes, make sure there is no red cross in the Custom CSS Box as any syntax error would cause all CSS under that line of code to not show up on the Frontend):

    div#header-outer.invisible:not(.at-top) .col.span_9 {
        transform: translateY(100%);
    }
    /* add smoothing to the transition */
    div#header-outer .col.span_9 {
        transition: transform .5s ease;
    }

    Thanks


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Hey! Thank you!

    I tried the updated CSS and showed it to the client...

    The client now wants to try having the Logo be fully static (not sticky) and only have the menu button be sticky without any animation or moving around... (Sorry if it's annoying :P)

    Could you provide the CSS for that?

  •  8,939
    Tahir replied

    Hey Again,

    Please turn off the Header hide until needed Feature in the Salient Theme Options Panel so that i can write up the correct CSS.

    Thanks 


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Done

  •  8,939
    Tahir replied

    Hey Again,

    Add this into the Custom CSS box in your Salient Theme Options panel (We write all Custom CSS in the Live Browser to ensure accuracy. If you cannot see any changes, make sure there is no red cross in the Custom CSS Box as any syntax error would cause all CSS under that line of code to not show up on the Frontend):

    #header-outer.scrolled-down .col.span_3 {
        visibility: hidden;
    }

    Thanks


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Would it be possible to have the logo slide up and not just vanish?

  •  8,939
    Tahir replied

    Yes, Only use the CSS below:

    div#header-outer.scrolled-down .col.span_3 {
        transform: translateY(-100%);
    }
    /* add smoothing to the transition */
    div#header-outer .col.span_3 {
        transition: transform .5s ease;
    }
    

    Thanks 


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Perfect! Can't thank you enough!

    God bless you!

  •  23
    alberteck replied

    Showed it to the client. He loved it!

    But he asked to make the logo visible in the mega menu 😅

    As of now, the mega menu shows the logo when we are at the top of the page, but now when we have scrolled down...he wants it to be visible at all times in the mega menu

  •  8,939
    Tahir replied

    Use below revised CSS.

    div#header-outer.scrolled-down:not(.side-widget-open) .col.span_3 {
        transform: translateY(-100%);
    }

    instead of 

    div#header-outer.scrolled-down .col.span_3 {
        transform: translateY(-100%);
    }
    

    Thanks 


    ThemeNectar Support Team 

  •  23
    alberteck replied

    It's perfect on desktop!

    However, on mobile, the logo doesn't hide itself, but rather just goes up from its normal position..

  •  8,939
    Tahir replied

    Hey Again,

    Use these now 

    @media only screen and (min-width: 1px) and (max-width: 999px) {
        div#header-outer.scrolled-down .col.span_3 {
            transform: translateY(-400%);
        }
        div#header-outer.scrolled-down.side-widget-open .col.span_3 {
            transform: translateY(0%);
        }
    }
    @media only screen and (min-width: 1000px) {
        div#header-outer.scrolled-down:not(.side-widget-open) .col.span_3 {
            transform: translateY(-100%);
        }
    }

    Thanks


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Thank you so much!

  •  23
    alberteck replied

    Hey

    The CSS Scripts you guys have sent worked great on mobile and desktop. However, the client sent me an issue he faced on tablets.

    When in portrait mode, it works great. But as soon as we change the tablet to landscape mode, the logo doesn't seem to appear when we scroll back up. Once it's already up, we would have to scroll again (or sometimes more than once) in order to make the Logo visible again.

    We tried this on an iPad, both on Chrome and Safari, and faced the same issue.

    Hoping for a resolution! Thanks!

  •   alberteck replied privately
  •  1,919
    Judith replied

    Hi There,

    We are not replicating this from out end. Please let us know the tablet model/device you are experiencing this from.

    Thanks.

  •  23
    alberteck replied

    iPad Air running iOS 12.5.4

  •  8,939
    Tahir replied

    Hey Again,

    Escalating this to the developer for further testing on an actual device.

    Thanks 


    ThemeNectar Support Team 

  •  1,085
    ThemeNectar replied

    Hey alberteck,

    In order to make that work consistently on all mobile devices, a slightly different approach would be required. Try to add in the following CSS snippet:

    div#header-outer[data-permanent-transparent="1"][data-mobile-fixed="1"]:not(.side-widget-open) {
        position: absolute!important;
       transform: none!important;
    }
    body #header-outer #top .slide-out-widget-area-toggle a {
        position: fixed!important;
        right: 30px;
    }
    div#header-outer.scrolled-down:not(.side-widget-open) .col.span_3,
    #top .span_9 >.slide-out-widget-area-toggle > div {
      transform: none!important;
    }
    

    Kind regards,

  •  23
    alberteck replied

    Hey!

    Thank you for the response

    The CSS provided kind of works, however:

    1) On desktop, both the logo and the menu seem to have shifted downwards, how could we retain the original position?

    2) Would it be possible to retain the animation for the logo?

    Thank you!

  •  1,085
    ThemeNectar replied

    Hey alberteck!

    Unfortunately, the method I've supplied doesn't have the option to animate the states.

    The excess space you're seeing is most likely related to the admin bar with the modification I supplied, which should only be visible for logged-in users. Try to add the following CSS in as well to handle that state:

    .admin-bar #header-outer[data-permanent-transparent="1"] {
        top: 0!important;
    }
    
  •  23
    alberteck replied

    Hey

    Yes you are correct, it is only visible to the logged in users, but the client expects employees to log in apparently.

    I tried adding that CSS you just sent, it pushes the logo upwards, but it also pushes the logo up in the megamenu, making it go beyond the browser...

  •  1,085
    ThemeNectar replied

    Can you provide a temporary admin login so that I can see what you're referring to?

    Kind regards,

  •   alberteck replied privately
  •  1,085
    ThemeNectar replied

    Thanks,

    I've amended the snippet to the following which should take care of the issue:

    .admin-bar #header-outer[data-permanent-transparent="1"]:not(.side-widget-open) {top: 0!important;}
    

    Kind regards,

  •  23
    alberteck replied

    Hi

    Thanks! That solved the issue!

    I showed it to the client, he was happy with it but pointed out that the Logo and the Menu button weren't aligned properly.

    I have attached the screenshots for both mobile and desktop.

  •  1,085
    ThemeNectar replied

    Hey,

    I'm glad to hear - I just added in one last snippet to handle the vertical adjustment:

    #top nav >ul .slide-out-widget-area-toggle { top: -10px; }

    Cheers

  •  23
    alberteck replied

    Thank you so much!

  •  1,085
    ThemeNectar replied

    You're welcomesmile.png

  •  23
    alberteck replied

    Hi!

    The logo and menu button are properly aligned for desktop, however, for mobile devices, the logo is higher than the menu button. Could you please let me know how I can bring the logo down to the same level as the menu button?

    Screenshot attached below


  •  8,939
    Tahir replied

    Hey,

    Please provide the page url so that i can write up the custom css for whats possible.

    Thanks


    ThemeNectar Support Team 

  •   alberteck replied privately
  •  8,939
    Tahir replied

    Hey Again,

    Add this into the Custom CSS box in your Salient Theme Options panel (We write all Custom CSS in the Live Browser to ensure accuracy. If you cannot see any changes, make sure there is no red cross in the Custom CSS Box as any syntax error would cause all CSS under that line of code to not show up on the Frontend):

    @media only screen and (min-width: 1px) and (max-width: 999px) {
        #header-outer #top #logo img {
        top: 20px !important;
        }
    }

    Thanks


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Perfect! Thanks!