Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #703879

    I would like to make submenu sticky in mobile like desktop. How do I do that?
    Have a look at submenu here http://artofbicycletrips.com/tours/bombay-to-goa-bike-tour/

    #703952

    Hey pankaj_mangal,

    Kindly add this code in Quick CSS (located in Enfold > General Styling):

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

    Hope this helps :)

    Best regards,
    Nikko

    #704112

    Hello Nikko,

    Thank you for reply. This makes the top header sticky. I want only the Fullwidth Sub Menu sticky. In this page :
    http://artofbicycletrips.com/tours/bombay-to-goa-bike-tour/ I want only the SUBMENU

    [OVERVIEW, ITINERARY, INCLUSIONS & MORE, REVIEWS, SIGNUP NOW]

    to be sticky.

    #704400

    Hey!

    Please edit your pages where you would like to apply these changes and then add following code inside Code Block element

    <style>
    @media only screen and (max-width: 767px) {
    .av-submenu-container {
        position: fixed!important;
        top: 111px!important;
    }
    #main {
        margin-top: 103px!important;
    }}
    </style>

    Cheers!
    Yigit

    #704638

    I want to apply this to all pages wherever submenu is?

    #704829

    Hi,

    Please add Code Block element to your pages where you have submenu and place that code inside that Code Block element. It is not easily possible to target those pages using a CSS selector.

    Best regards,
    Yigit

    #705752

    Hello,
    I tied putting in code block, it’s not working?
    Can I have a code which I put in Child Theme?

    #705753

    in Child style.css?

    #706809

    Hi,

    as Yigit already mentioned this won’t be possible. Please follow his instructions and use a code block element on the pages in question instead.

    Best regards,
    Andy

    #1000445

    Hi guys,

    I´ve used the code above:

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

    which works perfectly on mobile screens but when I alter the 767px to 990px to get it to work on the ipad burger menu it has no effect!!? Any suggestions on what I can do to get the same effect on ipad portrait (max-width 990px screens) would be awesome.

    Thanks in advance

    #1000762

    Hi ProTravelGolf,

    Try the code like this

    
    @media only screen and (max-width:990px) {
        #top {padding-top: 112px !important;}
        .responsive #top #wrap_all #header {
             position: fixed;
             top: 0;}
    }
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1000821
    This reply has been marked as private.
    #1000849

    Hi ProTravelGolf,

    I need to see the page with the issue to give you a better solution.

    Best regards,
    Victoria

    #1000855
    This reply has been marked as private.
    #1001142

    Hi ProTravelGolf,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    @media only screen and (max-width: 989px) and (min-width: 768px) {
      .responsive.html_mobile_menu_tablet.html_header_top #top #main {
          margin-top: -90px;
      }
      .responsive.html_mobile_menu_tablet #top #wrap_all #header {
        position: fixed;
        top: 0;
      }
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1001190

    Victoria,

    That´s awesome thank you. I had to adjust the code slightly to the following but it´s now working great:
    @media only screen and (max-width: 989px) and (min-width: 768px) {
    .responsive.html_mobile_menu_tablet.html_header_top #top #main {padding-top: 112px !important;}
    .responsive.html_mobile_menu_tablet #top #wrap_all #header {position: fixed; background-color: white!important;
    opacity: 1; top: 0;}
    }

    Thank you so much again!!

    #1001239

    Hi ProTravelGolf,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1321961

    this is the only way i found to have sticky submenus on mobile and even with transparent header and sticky header !
    see: https://webers-testseite.de/transparent-header/
    https://kriesi.at/support/topic/how-to-make-the-submenu-sticky-on-mobile/#post-1225108

    But there is a lot to do: have some child-theme alb elements ( the menu.js and to ensure loading the child-theme menu-js – the menu.php too )

    and this is the reason for the trouble in menu.js:

    if( burger_menu.is(":visible") ){
    	this.css({top: 'auto', position: 'absolute'}); fixed = false;
    	return;
    }
    #1341843

    And for replacing this if-condition it is necessary to do all the stuff mentioned in the other entry?

    #1342537

    Hi @spooniverse,

    Yes, you would need to find following in menu.js file

    					if( burger_menu.is(":visible") )
    					{
    						this.css({top: 'auto', position: 'absolute'}); fixed = false;
    						return;
    					}

    and change it to following in your child theme

    if( burger_menu.is(":visible") && (scrolled + modifier > top_pos) ){
    	this.css({top: header.Height() , position: 'fixed !important'}); fixed = true;
    }

    Best regards,
    Yigit

    #1342885

    Hey Guenni, since Enfold changed parts of the shortcode behaviour in Version 4.8.9 I changed your filter from this post to:

    add_filter('<strong>ava_builder_shortcode_files_loaded</strong>', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
    $template_url = get_stylesheet_directory();
      array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }

    I added your modifications to the latest theme files (Version 4.9) and it works as expected.

    If anyone wants to do the same just remember the correct filter.

    #1343089

    Hi,
    Thank you for sharing your filter, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 22 posts - 1 through 22 (of 22 total)
  • The topic ‘sticky submenu in mobile’ is closed to new replies.