So as I said and explain before here myStickymenu is based on javascript which will add .myfixed css class to any predefined element class after scroll by default.
This way we can have custom css style for Sticky class (.myfixed) as well as .wrapfixed and .up and .down classes.
.myfixed css class can be modified through dashboard plugin settings under “Style” tab and “CSS Style” field.
These are defaults:
#mysticky-nav .myfixed { margin:0 auto; float:none; border:0px; background:none; max-width:100%; } |
Example 1: Change background color on scroll down or up (Earlier setting for “Sticky Background Color” will be overridden)
#mysticky-nav.wrapfixed.up { background-color:#fff; } #mysticky-nav.wrapfixed.down { background-color:#ccc; } |
Example 2: Define custom link color while menu is sticky (presuming that your “Sticky class” is “navbar”).
.navbar li a { color:#FFF; } #mysticky-nav .navbar.myfixed li a { color:#000; } |
Example 3: Add shadow to sticky menu
#mysticky-nav.wrapfixed { -webkit-box-shadow: 0 2px 2px 0px rgba(66,66,66,0.3); -moz-box-shadow: 0 2px 2px 0px rgba(66,66,66,0.3); box-shadow: 0 2px 2px 0px rgba(66, 66, 66, 0.3); } |
Nice tutorial on how to create sticky header for WordPress using the Bosco theme and myStickymenu – How To Add A New Yorker Style Header To Your WordPress Site (same principle should work for any theme)
Back to myStickymenu plugin page.
Can any one help here. we recently design website in wordpress , they used sticky menu . but in mobile view when we click it goes to top in stead of popup downward. please help here my website is mentioned below .
This is great sticky menu. but i want it to be abit light and the option to make the popup to downward . Please help me
hi my name is Anuj, i am facing a problem in my sites mobile version, sticky header is not working in homepage when i open it in a mobile.
address- https://www.technogeo.com/
Hi, the menu is working perfectly fine for me, I was just wondering if there is any possibility to change the font color on scroll up/down just like we can do it for the background color ? Thanks a lot!