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; 

Example 1: Change background color on scroll down or up (Earlier setting for “Sticky Background Color” will be overridden)

#mysticky-nav.wrapfixed.up { 
#mysticky-nav.wrapfixed.down { 

Example 2: Define custom link color while menu is sticky (presuming that your “Sticky class” is “navbar”).

.navbar li a {
#mysticky-nav .navbar.myfixed li a {

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.

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

  1. If you want to change the background color of the sticky header, do the following… Go to your control panel–>Settings–>myStickymenu–>Style. In the CSS style section, do the following: edit the first item #mysticky-nav.wrapfixed{} to now be

    Go ahead and leave the rest of that section alone.

  2. hey, your plugin is really awesome and helpful. Even more importantly, it actually works while other fail.
    Only one problem I find with it, though: the header, when I\’m not scrolling, go all to the left while it\’s designed to be in the middle of the page. The spacing between elements is also reduced.
    When it scrolls, it scrolls nicely and it\’s centered better. Only the spacing is not good as it should be.
    If you reload any page, typically you should see the header (for a fraction of a second) in the way it is designed, and then it gets pushed to the left.
    I\’d like to donate, but I need these issues to be solved first…. Thank you for this amazing tool!!

    1. Did you tried with a different sticky class? Try some of the following classes/ids (without of the quotes):
      “#Header on the top” or “.elementor-top-section” .

      If this doesnt help try to add this css to css style at the end of the existing code:
      #mysticky-wrap {
      width: 100%;
      #mysticky-nav .myfixed {
      width: 100% !important;

      1. I found that in the Elementor page builder, once you add a name for any section in the CSS ID, you can use #whateveryournameis and this plugin works beautifully.

        Excellent work!

        1. This means you can create a menu using the Navmenu widget in Elementor to create a sticky menu. Just give it a CSS ID and use the ID in My Sticky Menu with the hashtag in front of the name and you should be set.

  3. Thank you for this plug-in! Is there a way to add my logo to the sticky menu, similar to yours on this site? And how can I alter the height of the sticky menu? I would just like it to be a little smaller. Thank you!!

  4. Hi and thanks for your great myStickymenu plugin!

    I am trying to center the chosen sticky div but can only manage an approximate centering adding: position:relative!important; left:10%; (It works approximately for me with a value of 10%) to your default .myfixed css class styling. I’ve been searching about “sticky menu centering” and more general “div centering” but could not find anything working.

    Is there a better, more robust way to center the .myfixed class ?

    Your help would be much appreciated. Thanks in advance.

  5. Thank you for the wonderful plugin.
    I need small help from you.
    My website is
    I have some strange problem. My Stickymenu is working perfectly as per my need but it is not working in the HOME page only. In HOME page, I need the same style as per other pages having.

Leave a Reply

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