WordPress.org

Support

Support » Themes and Templates » [Resolved] Fixed gray nav bar?

[Resolved] Fixed gray nav bar?

  • 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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Andrew Nevins

    @anevins

    Forum moderator

    How did you make that change, where?

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

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    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.

    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).

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    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;
    }

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Fixed gray nav bar?’ is closed to new replies.