Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #619196

    Hi guys,
    Thank you very much for this fantastic theme, using already 4 of them ;-)

    I have some issues trying to find a solution to get the header to stick on tablets and smartphones, i have tried some of the solutions found in the forum but nothing seems to work, I am using a child-enfold theme.

    I have added the css:

    @media (max-width:768px) { 
    
    .html_header_top .html_header_sticky #top #wrap_all #main {
        padding-top: 64px !important;
    }
    #wrap_all {
    position: relative !important;
    }

    I have also tried adding to my child function.php this code:

    function add_custom_padding(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('.responsive #top #main').css('padding-top','80px');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_padding');

    But nothing happens.

    Also I am using the header with logo left and menu bellow (with float to right css) and the Shrinking Header is on.
    Is there anyway to switch the header type to logo left and menu right when shrinking, i think that would look much better since it uses less space.
    I figured out I could use the following css:

    .container av-logo-container{
        height: 9px;
    }
    
    .logo, .logo a {
        overflow: visible;
    }

    But I don’t know where I could implement it since if seems like a jquery of JS.

    Thank you in advance.

    Cheers
    Daniel

    • This topic was modified 8 years, 7 months ago by Dewdan.
    #620974

    Hey Dewdan!

    Thank you for using Enfold.

    If I am not mistaken, it is disabled because a lot of mobile browsers do not support fixed or sticky elements and having a sticky header will consume what’s little left of the mobile screen. If you still want a fixed header, add this:

    @media only screen and (min-width: 989px) {
    #header {
        position: fixed !important;
    }
    }

    Best regards,
    Ismael

    #621115

    Thank you Ismael,

    I did solve that already but I appreciate your support.

    I understand the issue of space on smartphones, I will try to reduce the menu and logo as much as possible.
    The problem is that since it is a single page, it is not very user friendly navigation wise.

    Any good suggestion on how to reduce the logo and menu size?

    Cheers
    Daniel

    #622385

    Hi!

    As Ismael said, there is not much space for mobile, especially in portrait mode. You can change the code to following to have fixed header on screens down to mobile portrait only and not include it

    @media only screen and (min-width: 989px) and (min-width: 481px) {
    #header {
        position: fixed !important;
    }
    }

    Regards,
    Yigit

    #622860

    Thank you Yigit,

    Any suggestion on how can I get the header to have a smaller height?

    I am trying to reduce as much as possible the responsive menu and logo for the portrait mode on smartphone, I think that will do.

    The client want to have the menu no matter what! And the client is the kin, right? :-)

    #623038

    Hi!

    Right. But if client is not a UX professional, they should be open to suggestions by professionals, in my humble opinion :)
    Please try adding following code to Quick CSS

    @media only screen and (max-width: 480px) {
    .responsive .logo a {
        vertical-align: top;
    }
    
    .responsive .logo img {
        max-height: 40px!important;
    }
    .responsive #header_main .container {
        height: 50px!important;
    }
    .responsive #top #main {
        padding-top: 85px!important;
    }}

    Cheers!
    Yigit

    #623074

    Thank you Yigit,

    I know, but I already fixed that editing all css bellow 480 and the result is quite acceptable.
    I must say, after all, I kind of like to have the menu on single page :-)

    Thank you very much for you quick reply.
    Daniel

    #623100

    Hi!

    You are welcome, glad we could help :)
    Let us know if you have any other questions or issues

    Best regards,
    Yigit

    #664732

    Hi, I want a sticky menu on my Web pages for smartphones, but I do not know the html language. Is there any other way to do it?

    #665779

    Hi,

    use this code inside Quick CSS field:

    @media only screen and (max-width: 767px) {
    #advanced_menu_toggle {
    position: fixed;
    top: 35px;
    }}
    

    and adjust top value as needed.

    Best regards,
    Andy

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.