Position Secondary Menu on the Nav Menu

Hello i am using this code for my secondary menu:
#custom-fixed-menu {
position: absolute;
top: 22;
left: 0;
z-index: 99999;
}
i am trying it to be over the nav menu like when its sticky after scroll down like shown in this screenshot>> http://prntscr.com/jdif03

And not like when its default like this under the nav menu>> http://prntscr.com/jdif3f

Any suggestions how i might fix the code to perform right please?

Hi,

To achieve that, you can add the code below in Theme Options > JS

jQuery(function($) {
    $( "#custom-fixed-menu" ).insertBefore( ".ubermenu-main" );
});

Then change your css code to this.

.custom-fixed-menu {
     position: absolute;
     top: 0px;
     left: 0;
     z-index: 99999;
}

Hope that helps.

1 Like

it worked but however it adds a small space at the buttom of the menu, how do i make this space dissapear? screenshot>> http://prntscr.com/jdtn98

Hello There,

I have fixed your issue by removing the JS code given by Paul and have updated the custom css into this:

/*
// Settle 5776 Menu with Banner
*/
.masthead.masthead-inline {
  position: relative;
}
#custom-fixed-menu {
     position: absolute;
     top: 38px;
     left: 0;
     z-index: 99999;
}

Please check your site now.

1 Like

Great! Thank you so much!

You’re welcome!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.