- This topic has 4 replies, 2 voices, and was last updated 8 years, 3 months ago by marcodimi.
-
AuthorPosts
-
January 9, 2016 at 5:11 pm #82514marcodimiParticipant
how can I get my menu that slides down without using plugins? I saw that there are issues that allow this, there is a code that you enter to set the menu to the screen? thank you
January 9, 2016 at 5:44 pm #82526PratikKeymasterHi @marcodimi,
By menus to slide down, do you mean sub-menus? If so, in WordPress admin, you can control the menu by going to the Menu under Appearance tab. To make a drop down menu, you just drag and drop the items under another item. You need to drop it as a child element(just drag and drop it).If you want anything else, you will either need to hire a customizer or add it via plugin as this goes beyond the theme support scope.
Regards,
PratikJanuary 9, 2016 at 6:04 pm #82530marcodimiParticipantNo, I want to follow the menu scrolling down the page, as I have now, but no plugin because I do not want to load the site, I saw that other issues have this nice feature
January 10, 2016 at 1:41 pm #82569PratikKeymasterhi @marcodimi,
Sorry I misunderstood early. I think what you mean is to fix the primary menu.
This is a bit complex but it can be done following following steps:
1. Add following CSS code in Appearance=> Theme Options=> Custom CSS Styles#access.fixed { position: fixed; top: 0; width: 1000px !important; }
2. Then add following jQuery code in Appearance=> Theme Options=> Webmaster Tools=> Header and Footer Codes=> Code to display on Footer:
<script> jQuery(window).scroll(function () { if (jQuery(this).scrollTop() > 100) { jQuery('#access').addClass('fixed'); } else { jQuery('#access').removeClass('fixed'); } }); </script>
This will fix the menu whenever user scrolls below the primary menu.
If you always want the Primary Menu fixed, you can just add following code to Appearance=> Theme Options=> Custom CSS Styles and it will always be fixed to top.
#access { position: fixed; top: 0; width: 1000px !important; } #branding { margin-top: 44px; }
Let me know how things workout.
Regards,
PratikJanuary 10, 2016 at 4:17 pm #82584marcodimiParticipantit’s ok! thankyou
-
AuthorPosts
- The topic ‘fix the on-screen menu’ is closed to new replies.