• 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 › General Genesis Framework Discussions › Sticky menu – nav-primary

This topic is: not resolved

Tagged: menu, Nav Primary, sticky

  • This topic has 1 reply, 2 voices, and was last updated 5 months, 1 week ago by [email protected].
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 27, 2022 at 7:04 am #505839
    marcsaffar
    Participant

    Hello,
    I have allready published in themes forum
    https://studiopress.community/topic/sticky-menu-nav-primary/#post-505838

    I build a new site with latest genesis and genesis sample :
    https://uhjfrance.marcsaffar.website/_tc/trial.php?t=63e110e5
    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.

    Then I did some changes :

    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.

    I need a litlle help please.
    Cheers

    https://uhjfrance.marcsaffar.website/_tc/trial.php?t=63e110e5
    October 11, 2022 at 11:16 pm #505984
    [email protected]
    Participant

    nice

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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

© 2023 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