WordPress.org

Forums

Superhero
[resolved] Fixed gray nav bar? (7 posts)

  1. jnikkir
    Member
    Posted 2 years ago #

    Is there a way to get the top nav area (the gray bar at the top with title and links) to scroll with the rest of the page? I've tried changing the "position: fixed" line in the CSS (under #masthead-wrap), but that messes up the height and position as well... Any ideas? Is this possible?

  2. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    How did you make that change, where?

  3. jnikkir
    Member
    Posted 2 years ago #

    When I tried it, I edited the stylesheet in Appearance > Themes > Editor > style.css

  4. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    Instead of editing the theme's files, use a Custom CSS Manager plugin to hold your CSS modifications.

    Is there a way to get the top nav area (the gray bar at the top with title and links) to scroll with the rest of the page?

    Well, the theme's demo website achieves this already so try deactivating plugins to explore whether any could be responsible for your difference.

  5. jnikkir
    Member
    Posted 2 years ago #

    Ok, I'll try the plugin...

    But the demo website doesn't achieve what I'm looking for - it does exactly what my own site does. I don't want the top navbar to stay visible while the rest of the page scrolls under it. I'd like the nav bar to scroll up with the rest of the page (disappear when you scroll down).

  6. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    There are of course some other modifications you'll need to make when you remove the position: fixed style, such as;

    #masthead-wrap {
     padding-top: 25px;
    }
    
    #masthead {
     margin-top: 0;
    }
    
    #page {
     padding-top: 0 !important;
    }
  7. jnikkir
    Member
    Posted 2 years ago #

    Yes! That's exactly what I needed. Thank you so much, Andrew!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.