myStickymenu – Extended style functionality using .myfixed sticky class

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.

111 thoughts on “myStickymenu – Extended style functionality using .myfixed sticky class

  1. 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 .

  2. 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!

Leave a Reply to murdah Cancel reply

Your email address will not be published. Required fields are marked *