• 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

Hide sticky menu on mobile

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 › Archived Forums › Design Tips and Tricks › Hide sticky menu on mobile

This topic is: not resolved

Tagged: mobile, sticky

  • This topic has 5 replies, 2 voices, and was last updated 9 years, 1 month ago by vicentembd1.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • August 6, 2014 at 4:32 am #117310
    vicentembd1
    Member

    I used this tutorial and sticky menu works well... (THEME AGENT PRESS)

    http://my.studiopress.com/tutorials/sticky-menu/

    but I don´t want use sticky menu on mobile phone...

    Any suggestion?

    http://www.castillodesagunto.com
    August 7, 2014 at 4:36 pm #117663
    Jon Schroeder
    Member

    Are you wanting that menu to be there, but not sticky, or are you wanting to remove it entirely?

    If you'd like to just be rid of it completely, here's a snippet to add at the end of your stylesheet which should hide it for everyone viewing the site at a width below 767px:


    @media
    (max-width:767px) {
    #subnav { position: absolute;left: -999px;top: -999px;}
    }

    August 9, 2014 at 2:31 am #117878
    vicentembd1
    Member

    Hello Jon.. thanks for you support...

    I want remove only sticky.

    I´ve changed but it doesn´t work.. but I´m not sure if I do it well:

    Thants is the code I put in my stylessheet:

    FILE: style.css
    FOLDER: wp-content/themes/agentpress-pro
    NEW URL: http://www.construccionesjp.es (I use to test)

    CODE TUTORIAL (http://my.studiopress.com/tutorials/sticky-menu/)
    ************************
    /* Secondary Navigation
    --------------------------------------------- */

    .nav-secondary {
    background-color: #333;
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    }

    .nav-secondary .genesis-nav-menu a {
    padding: 20px;
    padding: 2rem;
    }

    .nav-secondary .genesis-nav-menu .sub-menu a {
    padding: 16px 20px;
    padding: 1.6rem 2rem;
    }

    .nav-secondary a:hover,
    .nav-secondary .current-menu-item > a,
    .nav-secondary .menu-item-home > a,
    .nav-secondary .menu-item-home > a:hover {
    color: #fff;
    }

    .nav-secondary .sub-menu a:hover {
    color: #333;
    }

    .nav-secondary .sticky-right {
    float: right;
    }


    @media
    only screen and (max-width: 767px) {

    .nav-secondary .sticky-right {
    float: none;
    }

    }

    ****************************

    NEW CODE

    **********************
    /* Secondary Navigation
    --------------------------------------------- */

    .nav-secondary {
    background-color: #002859;
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;

    }

    .nav-secondary .genesis-nav-menu a {
    padding: 20px;
    padding: 2rem;
    color: #fff; /* antes nada*/
    }

    .nav-secondary .genesis-nav-menu .sub-menu a {
    padding: 16px 20px;
    padding: 1.6rem 2rem;
    }

    .nav-secondary a:hover,
    .nav-secondary .current-menu-item > a,
    .nav-secondary .menu-item-home > a,
    .nav-secondary .menu-item-home > a:hover {
    color: #fff;
    }

    .nav-secondary .sub-menu a:hover {
    color: #fff;
    }

    .nav-secondary .sticky-right {
    float: right;
    }


    @media
    (max-width:767px) {
    #subnav { position: absolute;left: -999px;top: -999px;}

    }

    *******************************

    Thank you very much!!

    August 12, 2014 at 6:54 am #118380
    vicentembd1
    Member

    Anyone That Could help me? 🙂

    August 12, 2014 at 12:33 pm #118444
    Jon Schroeder
    Member

    Try this, then:


    @media
    (max-width:767px) {
    .nav-secondary { position:static !important; }
    }

    See if that does what you're wanting.

    August 14, 2014 at 3:21 am #118730
    vicentembd1
    Member

    Hello Jon:

    You are the best!!! It´s work :-)!!!

    Now, Sticky appears at the end of the web, affter footer, but It´s ok for me

    Thank you, thank you, thank you 🙂

    SUMMARY

    FILE: style.css
    FOLDER: wp-content/themes/agentpress-pro
    CODE:
    *******************
    /* Secondary Navigation
    --------------------------------------------- */

    .nav-secondary {
    background-color: #002859;
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;

    }

    .nav-secondary .genesis-nav-menu a {
    padding: 20px;
    padding: 2rem;
    color: #fff; /* antes nada*/
    }

    .nav-secondary .genesis-nav-menu .sub-menu a {
    padding: 16px 20px;
    padding: 1.6rem 2rem;
    }

    .nav-secondary a:hover,
    .nav-secondary .current-menu-item > a,
    .nav-secondary .menu-item-home > a,
    .nav-secondary .menu-item-home > a:hover {
    color: #fff;
    }

    .nav-secondary .sub-menu a:hover {
    color: #fff;
    }

    .nav-secondary .sticky-right {
    float: right;
    }


    @media
    (max-width:767px) {
    .nav-secondary { position:static !important; }

    ******************************************

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

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