• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Sticky menu – nav-primary

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › StudioPress Themes › Genesis Sample › Sticky menu – nav-primary

This topic is: not resolved

Tagged: menu, Nav Primary, sticky

  • This topic has 2 replies, 1 voice, and was last updated 2 years, 7 months ago by marcsaffar.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 22, 2022 at 7:51 am #505829
    marcsaffar
    Participant

    Hello,
    I moved the main menu under the site-header by deactivating this in functions.php :
    //remove_action( 'genesis_after_header', 'genesis_do_nav' );
    //add_action( 'genesis_header', 'genesis_do_nav', 12 );

    I disabled the sticky position of the site header in the css
    I enabled a sticky position of the main menu in the css at line 1137 :

    .js .nav-primary {
    display: none;
    position: sticky; /* was relative;*/
    top: 0;/*added by me*/
    z-index: 10;/*added by me*/
    }
    This works well except in Firefox (standard and developer edition) with which we get erratic scroll behaviors : return to the top of the page, large white spaces between the menu and the beginning of the content.

    Thanks for helping.
    Kind regards.

    September 22, 2022 at 8:33 am #505830
    marcsaffar
    Participant

    Sorry here is the link
    https://uhjfrance.marcsaffar.website/_tc/trial.php?t=63e110e5

    September 23, 2022 at 6:58 am #505838
    marcsaffar
    Participant

    Hello,
    I did some work since :

    restore default css here :
    .js .nav-primary {
    display: none;
    position: relative;
    }
    and modified this line about 1564 :
    /* Header Menu
    --------------------------------------------- */

    .nav-primary {
    /*marc saffar ajoute*/
    position: -webkit-sticky;
    position: sticky !important;
    top: 0;
    z-index: 15;
    /*fin de l'ajout*/
    background-color: #063B6C;
    padding-left: 30px;/*ajouté par marc saffar*/
    clear: none;
    float: left;/*marc saffar était right*/
    width: 100%;/*marc saffar était auto*/
    }

    It seems to work a little bit better with same problem less often but it is not perfect.

    Also I tested in a previous version of genesis sample and there is no problem at all. They changes some code since but it is not well documented at all.

    Still need help.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble