• 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

Remobile Pro and Sticky Message

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 › Remobile Pro and Sticky Message

This topic is: resolved

Tagged: primary navigation, responsive menu, sticky message

  • This topic has 1 reply, 1 voice, and was last updated 11 years, 7 months ago by Jim Goodrich.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 20, 2015 at 11:04 am #138081
    Jim Goodrich
    Participant

    I'm developing a site using remobile pro and want to use a sticky message, as outlined in Brian Gardner's post at http://briangardner.com/genesis-sticky-message/.

    The issue is that the sticky message sits on top of the primary navigation and responsive menu so the links aren't accessible through the sticky message area, even though it doesn't display until the visitor has scrolled down by 100px. I believe the answer is in the z-index, but I'm not finding the solution. There's a .js file I won't post here, but here's the php from the Functions.php:

    //* Register sticky message widget area
    genesis_register_sidebar( array(
    	'id'          => 'sticky-message',
    	'name'        => __( 'Sticky Message', 'bg-mobile-first' ),
    	'description' => __( 'This is the sticky message widget area.', 'bg-mobile-first' ),
    ) );
    
    //* Hook sticky message before site header
    add_action( 'genesis_before', 'mobile_first_sticky_message' );
    function mobile_first_sticky_message() {
    
    	genesis_widget_area( 'sticky-message', array(
    		'before' => '<div class="sticky-message">',
    		'after'  => '</div>',
    	) );
    
    }
    
    //* Enqueue scripts and styles
    add_action( 'wp_enqueue_scripts', 'mobile_first_sticky_message_scripts' );
    function mobile_first_sticky_message_scripts() {
    
    	wp_enqueue_script( 'mobile-first-stickey-message', get_bloginfo( 'stylesheet_directory' ) . '/js/sticky-message.js', array( 'jquery' ), '1.0.0' );
    
    }

    And here is the css for the sticky message:

    .sticky-message {
    	background-color: #d31145;
    	font-size: 16px;
    	opacity: 0;
    	padding-bottom: 20px;
    	padding-top: 20px;
    	position: fixed;
    	text-align: center;
    	width: 100%;
    	z-index: 999;
    }
    
    .sticky-message {
    	-webkit-transition: all 0.3s ease-in-out;
    	-moz-transition:    all 0.3s ease-in-out;
    	-ms-transition:     all 0.3s ease-in-out;
    	-o-transition:      all 0.3s ease-in-out;
    	transition:         all 0.3s ease-in-out;
    }
    
    .sticky-message.reveal {
    	opacity: 1;
    }
    
    .sticky-message,
    .sticky-message a:hover,
    .sticky-message p {
    	color: #fff;
    }
    
    .sticky-message a {
    	color: #fff;
    }
    
    .sticky-message p:last-child {
    	margin-bottom: 0;
    } 

    The dev site is http://vah.jamesgoodrich.net. What am I missing?

    http://vah.jamesgoodrich.net
    January 20, 2015 at 12:57 pm #138112
    Jim Goodrich
    Participant

    I was overthinking, looking for the difficult answer with z-index. It ended up being two simple z-index changes. First, cahnge the default z-index to -1 on the sticky message itself

    .sticky-message {
    	background-color: #d31145;
    	font-size: 16px;
    	opacity: 0;
    	padding-bottom: 20px;
    	padding-top: 20px;
    	position: fixed;
    	text-align: center;
    	width: 100%;
    	z-index: -1;
    }

    Second, add a z-index of 999 to the sticky-message .reveal:

    .sticky-message.reveal {
    	opacity: 1;
            z-index: 999;
    }

    And the primary navigation and responsive menu sits nicely on top and when the sticky message reveals at 100px, its message is on top as well.

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

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